亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? proc_model.m

?? matlab仿真的文件包然后寫出其具體功能(至少要20個字)。盡量不要讓站長把時間都花
?? M
?? 第 1 頁 / 共 2 頁
字號:
%proc_model manipulates system models.  The syntax of the function is 
%
%   W_Sys=proc_model(nTask,g_model,key,arg1,arg2,arg3)
%where 
%   nTask -- the task code for model processing, details of it can be found 
%          in the function
%   g_model -- the model code
%   key -- if there are three input arguments it is used to enter a model 
%          from num, den strings.  In this case, a model W_Sys is returned
%   arg1,arg2,arg3 -- extra auguments, used in display system realizations
%
%The functions available in the module are
%
%  disp_model -- displays the system models.  
%  disp_rattf --- displays transfer function in fractional format
%  zp2disp  --- displays transfer function in factorized format
%  pzeros2str  --- get the string for factorized polynomial
%  get_model -- get the model from the GUI
%  new_model -- displays the new model entering GUI
%  chg_model_type -- allows one to change model format
%  enter_model -- allows one to enter system model
%  get_poly -- converts a polynomial 's' string into a vector
%  poly_evl -- a supporting function for get_poly
%  build_simu -- provide an template of SIMULINK model
%  mk_sim -- process and display the SIMULINK model entered
%  is_delay -- checks whether there is delay in the whole system
%  is_simu -- checks whether there is delay in the whole system
%  clear_model -- clears the current model
%

%Copyright (c) 1997-1999 by Professor Dingyu Xue
%School of Information Science and Engineering, Northeastern University
%Shenyang 110006, P R China
%Email: xue_dy@hotmail.com
%
%This module is used only with CtrlLAB.
%-----------------------------------------------------------------------------

function W_Sys=proc_model(nTask,g_model,key,arg1,arg2,arg3)

switch nTask
case 0,
   %process system model
   if nargin==3,
      uu0=get(findobj('Tag','CtrlLABMain'),'UserData'); 
      uu=get(uu0{1}(g_model),'UserData');
   else, uu=get(gco,'UserData'); end
   ii=[10:13]; 
   extra_funs(4,3,'Checked',9+g_model,ii(find(ii~=9+g_model))); 
   %check the existance of model of the block
   key=1; 
   if length(uu)==0, key=0; %model dose not exist
   elseif uu{1}==4 & length(uu{2})==0, key=0; %simulink type model dose not exist
   end 
   %if model dose not exist, then enter it
   if key==0, get_model(g_model); %if model dose not exist, then enter it
   else, disp_model(g_model, uu); %otherwise, display it
   end
case 1, %display system model
   switch nargin
      case 1, disp_model;
      case 2, disp_model(g_model);   
      case 6, disp_model(g_model,key,arg1,arg2,arg3); 
   end      
case 2, %call get_model function
   switch nargin
      case 1, get_model;
      case 2, get_model(g_model);   
      case 3, W_Sys=enter_model(g_model,key);
   end      
case 3, mk_sim; %call function to process and display SIMULINK blocks
case 4, disp_model(7); %display the SIMULINK model
case 5, clear_model;
case 6, disp_model(6,g_model); %display the linearized model
case 7, W_Sys=is_delay; %check whether there is delay in the whole system
case 8, W_Sys=is_simu; %check whether there is SIMULINK model in the whole system
case 9, %display error message
   warn_msg=str2mat('              IMPORTANT NOTICE',...
      'Due to the problem in SIMULINK, one should',...
      'not click this button to get the system model.',...
      'Instead, he should type mk_sim in MATLAB',...
      'command window.');
   warndlg(warn_msg,'Warning: SIMULINK bug.  Try this');
end
   
%----------------------------------------------------------------------------------
%disp_model displays the system models.  The syntax of the function is 
%
%   disp_model(g_model,uu,c,d,key)
%where 
%      g_model is the key code of the model to display, if g_model=5 then the 
%         reduced model is displayed.
%      uu is the model itself.
%      c,d is the the c vector and d constant in the state space format, if entered.
%      key is the format for realizations
%-----------------------------------------------------------------------------------
function disp_model(g_model,uu,c,d,key)

h_main=findobj('Tag','CtrlLABMain');
figure(h_main); uu0=get(h_main,'UserData');
g4=get(uu0{1}(4),'UserData');

if nargin==5
   n_disp=2; uu=ss(g_model,uu,c,d); g_model=1;
   switch key
   case 1, str_model='Controllability realization';
   case 2, str_model='Observability realization';
   case 3, str_model='Modal realization';
   case 4, str_model='Minimal realization';   
   case 5, str_model='Balanced realization';   
   end
else   
   if nargin==0, 
      g_model=extra_funs(5,3,'Checked',10:13); uu=get(uu0{1}(g_model),'UserData');
      if length(uu)==0, return; end
   elseif nargin==1
      if g_model==5, uu=g4{4};
      elseif g_model==7,
         %display the SIMULINK model
         g_model=extra_funs(5,3,'Checked',10:13); uu_s=get(uu0{1}(g_model),'UserData');
         if exist(uu_s{3})==4, open_system(uu_s{3})
         else, 
            warndlg('SIMULINK model no longer exist','Warning: Model failed!');
            set(uu0{1}(g_model),'UserData',[]);
         end   
         return;
      else, uu=get(uu0{1}(g_model),'UserData'); end   
   end   
   
   switch g_model
   case 1, str_model='Plant model';
   case 2, str_model='Controller model';
   case 3, str_model='Feedback model';
   case 4, str_model='Delay model';  
   case 5, str_model='Reduced order model';   
   case 6, str_model='Linearized model';   
   end
   vec=get(uu0{3}(20:23),'Checked');
   for n_disp=1:4, if strcmp(vec{n_disp},'on'), break; end, end
   if any([1,2,3,6]==g_model), uu=uu{2}; end
end   
display_str; display_str(0.1,0.9,str_model); 
if g_model==4
   display_str(0.1,0.6,['e^{-' num2str(uu{1}), 's}']);
   display_str(0.1,0.4,['Order of Pade Approximation is ' int2str(uu{2})]);
else   
   switch n_disp
   case 1, g_sys=tf(uu); xL=disp_rattf(0.1,0.61,g_sys);
   case 2, g_sys=ss(uu);
      xL(1)=display_str(0.04,0.7,['A: ',mat2str(g_sys.a,4)]);
      xL(2)=display_str(0.04,0.5,['B^T: ',mat2str(g_sys.b,4)]);   
      xL(3)=display_str(0.04,0.3,['C: ',mat2str(g_sys.c,4)]);   
      display_str(0.04,0.1,['D: ',display_str(g_sys.d,4)]);   
      uu_a=get(gcf,'UserData'); set(uu_a(3),'UserData',g_sys,'Visible','on');
   case 3, xL=[]; [z,p,k]=zpkdata(uu,'v');
      display_str(0.04,0.65,['Gain: ' display_str(k)]);
      display_str(0.04,0.51,'Zeros: '); xL(1)=display_str(0.15,0.51,z,0);
      display_str(0.04,0.36,'Poles: '); xL(2)=display_str(0.15,0.36,p,0);
   case 4, xL=zp2disp(0.1,0.61,uu);
   end
   if g_model==1,
      if g4{1}>0 & any([1,4]==n_disp), 
         display_str(xL,0.61,[' e^{-' display_str(g4{1}) 's}']); 
      end
   elseif g_model==5
      if g_sys.Td>0 & any([1,4]==n_disp),
         display_str(xL,0.61,[' e^{-' display_str(g_sys.Td) 's}']); 
      end
   elseif g_model==6, bb=get(gcf,'UserData'); set(bb(7),'Visible','on');
   end   
   if g_model<=3, g_x=get(uu0{1}(g_model),'UserData');
      if g_x{1}==4, bb=get(gcf,'UserData'); set(bb(7),'Visible','on'); end   
   end   
end

%--------------------------------------------------------------------------------
%disp_rattf displays the system model in rational fraction format.  The syntax of
%the function is
%
%   xL=disp_rattf(a0,b0,tf_mod)
%where a and b are the starting point of display, tf_mod is the model to be 
%displayed wchi should be given in transfer function format.  The variable xL 
%returns the x-coordinate of the display.
%--------------------------------------------------------------------------------
function xL=disp_rattf(a0,b0,tf_mod)
[num,den]=tfdata(tf_mod,'v'); vec_n=display_str(num); vec_d=display_str(den);
width1=extra_funs(7,vec_n)/66; width2=extra_funs(7,vec_d)/66;
xx=0.12; if length(find(vec_d)=='^')==0, xx=0.08; end
maxLength=a0+0.5*max(width1,width2);
xL1=display_str(maxLength-0.5*width1,b0+0.07,vec_n);
xL2=display_str(maxLength-0.5*width2,b0-xx,vec_d);
xL=max(xL1,xL2); h=line([a0,xL],[b0 b0]); set(h,'Color',[0,0,0]);

%----------------------------------------------------------------------------------
%zp2disp displays the system model in factorized transfer functions.  The syntax of
%the function is
%
%   xL=zp2disp(x,y,tf_mod)
%where x and y are the starting point of display, tf_mod is the model to be 
%displayed wchi should be given in pole-zero-gain format.  The variable xL returns 
%the x-coordinate of the display.
%----------------------------------------------------------------------------------
function xL=zp2disp(x,y,tf_mod)
[z,p,k]=zpkdata(tf_mod,'v'); 
xL0=display_str(x,y,display_str(k)); vec_p=pzeros2str(p); a0=xL0;
if length(z)==0, vec_z='1';
else, vec_z=pzeros2str(z); end
width1=extra_funs(7,vec_p)/66; width2=extra_funs(7,vec_z)/66;
maxLength=xL0+0.5*max(width1,width2); xL=maxLength-0.5*width2;
xL1=display_str(xL,y+0.08,vec_z); xL=maxLength-0.5*width1;
xx=0.12; if length(find(vec_p=='^'))==0, xx=0.08; end
xL2=display_str(xL,y-xx,vec_p); xL=max(xL2,xL1);
h=line([a0,xL],[y y]); set(h,'Color',[0,0,0]);

%-------------------------------------------------------------------------------
%pzeros2str converts a factorized polynomial into a string.
%
%   Str_C=pzeros2str(z)
%where z contains all the zeros of the polynomial.  The returned variable Str_C 
%is the string converted.
%-------------------------------------------------------------------------------
function Str_C=pzeros2str(z);
Str_C=[];
if length(z)>0
   [xx,ii]=sort(real(z)); z=z(ii,:); order=ones(length(z),1); vec1=[];  ss1=0;
   for i=1:length(z), 
      ii=find(abs(vec1-z(i,:))<1e-8); 
      if length(ii)>0, order(ii(1))=order(ii(1))+1; order(i)=0; end
      vec1=[vec1, z(i,:)];
   end
   ii=find(imag(z)<0); order(ii)=zeros(size(ii)); k0=find(abs(z)<1e-10); k=length(k0);
   if k>0, 
      Str_C=[Str_C,'s'];
      if k>1, Str_C=[Str_C '^{' int2str(k) '}']; end
      order(k0(1))=0;
   end
   for i=1:length(z), 
      if order(i)>0
         vecc='-'; if real(z(i))<0, vecc='+'; end, Str_C=[Str_C '(s']; 
         if abs(real(z(i)))>1e-8, 
            ssx=display_str(real(z(i)));
            if real(z(i))<0, ssx=ssx(2:end); end
            Str_C=[Str_C vecc ssx];
         end
         if imag(z(i))>1e-8, Str_C=[Str_C '\pm' display_str(imag(z(i))) 'i']; end
         Str_C=[Str_C ')'];
         if order(i)>1, Str_C=[Str_C '^{' int2str(order(i)) '}']; end
      end 
   end 
end

%-------------------------------------------------------
%get_model get the model from the user through the GUI.
%
%   W_Sys=get_model(g_model,arg1)
%-------------------------------------------------------
function W_Sys=get_model(g_model,arg1)

switch nargin
case 0, new_model;
case 1,
   if g_model==0, chg_model_type;
   elseif g_model==-1, enter_model; 
   else, new_model; end
end

%-------------------------------------------------------
%new_model displays the new model entering GUI.
%-------------------------------------------------------
function new_model(keyVis)

if nargin==0, keyVis='on'; end

figure(findobj('Tag','CtrlLABMain')); uu=get(gcf,'UserData');
g_model=extra_funs(5,3,'Checked',10:13); uu0=get(uu{1}(g_model),'UserData');

%set the model entering mode to its original
if length(uu0)==0, u_type=1; else, u_type=uu0{1}; end
key=0;
if u_type==4, if exist(uu0{3})==4, key=1; else, key=-1; end, end   
if key==0
   %enter the system model again
   g_mod=findobj('Name','Enter system model'); k0=g_mod;
   if length(g_mod)==0
      g_mod = figure('Units','normalized','Position',[0.259 0.358 0.435 0.275], ...
         'MenuBar','none','Color',[0.8 0.8 0.8],'Visible',keyVis,'Tag','CtrlLABExtras', ...
         'NumberTitle','off','Name','Enter System Model','Resize','off');
      extra_funs(1);
      b(1)=uicontrol('Style','PushButton','String','Apply',...
         'Units','normalized','Position',[0.80 0.78 0.17 0.14],'CallBack','proc_model(2,-1);');
      b(2)=uicontrol('Style','PushButton','String','Cancel',...
         'Units','normalized','Position',[0.80 0.60 0.17 0.14],'CallBack','delete(gcf)');
      b(3)=uicontrol('Style','PushButton','String','Help',...
         'Units','normalized','Position',[0.80 0.42 0.17 0.14],'Callback','clab_help(1);');
      b(14)=uicontrol('Style','PushButton','String','Clear Model',...
         'Units','normalized','Position',[0.74 0.24 0.23 0.14],'CallBack','proc_model(5);');
      [x,b(4)]=display_str(0.05,0.93,'Numerator Polynomial',[0,0,0],'on',9);
      b(5)=uicontrol('Style','Edit','String','[1]',...
         'Units','normalized','Position',[0.09 0.75 0.63 0.115], ...
  	      'BackgroundColor',[1 1 1],'HorizontalAlignment','left');
      [x,b(6)]=display_str(0.05,0.68,'Denominator Polynomial',[0,0,0],'on',9);
      b(7) = uicontrol('Style','Edit','String','[1,1]',...
         'Units','normalized','Position',[0.09 0.50 0.63 0.115], ...
  	      'BackgroundColor',[1 1 1],'HorizontalAlignment','left');
      [x,b(8)]=display_str(0.52,0.12,'Other Type',[0,0,0],'on',9);
      if g_model==4, u_type=1; end
      b(9) = uicontrol('Style','PopupMenu','Value',u_type, ...
     	   'String','Transfer Function|State Space|Pole-zero-gain|SIMULINK', ...
         'Units','normalized','Position',[0.70 0.05 0.27 0.12], ...
     	   'BackgroundColor',0.8*[1,1,1],'CallBack','proc_model(2,0);');
      [x,b(10)]=display_str(0.05,0.43,'C Matrix',[0,0,0],'off',9);
      b(11) = uicontrol('Style','Edit','String','[1]', ...
         'Units','normalized','Position',[0.09 0.25 0.63 0.115],...
         'BackgroundColor',[1 1 1],'HorizontalAlignment','left','Visible','off');
      [x,b(12)]=display_str(0.05,0.11,'D Constant',[0,0,0],'off',9);
      b(13) = uicontrol('Style','Edit','String','[0]', ...
         'Units','normalized','Position',[0.24 0.05 0.15 0.115], ...
  	      'HorizontalAlignment','left','BackgroundColor',[1 1 1],'Visible','off');
      uu={1,b,g_model};
   else
      %get the code of the model
      figure(g_mod); uu=get(g_mod,'UserData'); uu{3}=g_model; 
   end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品网站在线观看| 欧美系列在线观看| 成人福利视频在线看| 日韩av成人高清| 国产一区二区三区在线观看免费视频| 国产精品66部| 欧美综合天天夜夜久久| 成人黄色软件下载| 成人高清视频在线观看| 欧美性大战久久久久久久蜜臀 | 国产美女av一区二区三区| 国产不卡视频在线播放| 一本大道久久a久久综合| 欧美精品国产精品| 精品播放一区二区| 亚洲一区二区三区四区在线免费观看| 久久精品国产成人一区二区三区| 97精品久久久午夜一区二区三区 | 国产精品久久久久毛片软件| 另类欧美日韩国产在线| 69av一区二区三区| 亚洲成人777| 欧美精选一区二区| 亚洲福利视频一区| 97精品久久久午夜一区二区三区| 制服.丝袜.亚洲.另类.中文| 一区二区三区高清| 91色九色蝌蚪| 一区二区不卡在线播放 | 国产精品电影一区二区| 国产福利91精品一区二区三区| 日韩欧美一级特黄在线播放| 天天操天天干天天综合网| 欧美视频一二三区| 日日夜夜免费精品视频| 制服丝袜亚洲播放| 久久aⅴ国产欧美74aaa| 精品国产乱码久久久久久夜甘婷婷| 丝袜诱惑制服诱惑色一区在线观看| 欧美区视频在线观看| 五月激情六月综合| 欧美成人在线直播| 国产福利一区在线| 悠悠色在线精品| 欧美视频一区二区三区四区| 亚洲电影中文字幕在线观看| 欧美日韩亚洲高清一区二区| 日韩成人精品视频| 精品电影一区二区三区| 国产成人亚洲精品青草天美| 国产亚洲精品aa| 91女厕偷拍女厕偷拍高清| 亚洲欧美国产高清| 欧美日韩一级大片网址| 国产一区二区三区四区五区美女 | 91精品在线观看入口| 精品一区二区三区影院在线午夜| 久久久高清一区二区三区| 91亚洲男人天堂| 偷窥少妇高潮呻吟av久久免费| 欧美成人a∨高清免费观看| 成人妖精视频yjsp地址| 天堂va蜜桃一区二区三区| 久久久久国产免费免费| 欧美亚洲动漫制服丝袜| 黑人巨大精品欧美一区| 伊人色综合久久天天人手人婷| 日韩欧美国产精品| 日本丶国产丶欧美色综合| 麻豆精品在线观看| 亚洲黄色性网站| 2024国产精品| 欧美疯狂做受xxxx富婆| av亚洲精华国产精华精华| 日韩av一区二区三区四区| 亚洲视频图片小说| 久久综合久久综合九色| 欧美影院精品一区| 成人综合婷婷国产精品久久 | 精品日韩一区二区| 色婷婷亚洲精品| 国产精品91xxx| 天堂一区二区在线| 综合久久给合久久狠狠狠97色| 日韩精品一区二区三区四区视频| 色欧美日韩亚洲| 国产超碰在线一区| 精品一区二区在线播放| 五月婷婷综合在线| 亚洲六月丁香色婷婷综合久久| 久久伊人中文字幕| 日韩美女主播在线视频一区二区三区| 99精品视频中文字幕| 国产精品66部| 国产最新精品免费| 久久精品国内一区二区三区| 亚洲影院理伦片| 亚洲免费三区一区二区| 国产日韩精品一区| 久久丝袜美腿综合| 精品国产一区二区精华| 5月丁香婷婷综合| 欧美色图激情小说| 欧美午夜精品一区| 欧美日韩一区二区三区免费看| 99re成人精品视频| 成人免费视频国产在线观看| 国产精品77777| 国产大片一区二区| 国产成都精品91一区二区三| 国产揄拍国内精品对白| 国产在线不卡一区| 国产精品一区免费在线观看| 国产一区二区免费在线| 国模少妇一区二区三区| 韩国女主播成人在线| 性感美女久久精品| 亚洲高清久久久| 爽好多水快深点欧美视频| 美日韩一区二区| 国内久久精品视频| 成人爱爱电影网址| 91在线精品一区二区| 日本韩国精品一区二区在线观看| 色av成人天堂桃色av| 欧美精品丝袜中出| 日韩一区二区三区高清免费看看| 91精品蜜臀在线一区尤物| 日韩亚洲欧美成人一区| 久久久久久久久久久久久夜| 国产精品无圣光一区二区| 亚洲欧美日韩国产一区二区三区| 亚洲一区二区三区小说| 石原莉奈在线亚洲三区| 九色综合国产一区二区三区| 福利一区二区在线| 色94色欧美sute亚洲线路二| 欧美精品久久一区| 久久美女艺术照精彩视频福利播放 | 色婷婷亚洲精品| 日韩欧美成人一区二区| 欧美激情一区三区| 亚洲成av人片一区二区梦乃| 精东粉嫩av免费一区二区三区| 国产成人免费视| 欧美视频在线一区二区三区 | 亚洲第一狼人社区| 国产在线观看一区二区| 日本韩国一区二区三区| 精品乱人伦一区二区三区| 亚洲九九爱视频| 国产一区二区三区香蕉| 欧美性做爰猛烈叫床潮| 精品999在线播放| 亚洲综合一区二区| 韩国精品主播一区二区在线观看| 97精品久久久午夜一区二区三区 | 激情综合色播激情啊| 色94色欧美sute亚洲13| 久久这里只有精品首页| 亚洲已满18点击进入久久| 国产精品资源在线观看| 欧美福利视频一区| 亚洲精品国久久99热| 国产91精品一区二区麻豆亚洲| 91.com视频| 亚洲精品乱码久久久久久| 成人丝袜高跟foot| 精品国产sm最大网站| 亚洲成人免费视频| 一本大道久久a久久精品综合| xnxx国产精品| 日本大胆欧美人术艺术动态| 色综合色综合色综合色综合色综合| 欧美成人三级在线| 亚洲18色成人| 在线一区二区视频| 亚洲欧美激情插 | 国产精品 欧美精品| 欧美一区二区三区免费在线看| 亚洲精品美国一| 99麻豆久久久国产精品免费| 久久先锋资源网| 久久草av在线| 日韩免费高清视频| 麻豆国产91在线播放| 欧美一区二区三级| 偷窥国产亚洲免费视频| 欧美日韩dvd在线观看| 亚洲国产精品久久久男人的天堂| 9i看片成人免费高清| 国产精品三级视频| 懂色av中文字幕一区二区三区| 精品久久久久久久一区二区蜜臀| 日本三级韩国三级欧美三级| 欧美一区二区三区影视| 美女视频一区二区三区| 日韩一级完整毛片| 另类欧美日韩国产在线| 26uuu国产在线精品一区二区|