亚洲欧美第一页_禁久久精品乱码_粉嫩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在线| 亚洲福中文字幕伊人影院| 寂寞少妇一区二区三区| 欧美综合亚洲图片综合区| 国产亚洲午夜高清国产拍精品| 亚洲人成网站在线| 国产成人亚洲综合色影视| 91黄色免费版| 国产精品久久久久久久久晋中 | 粉嫩高潮美女一区二区三区| 欧美性受极品xxxx喷水| 国产女主播一区| 免费成人你懂的| 欧美影院精品一区| 亚洲夂夂婷婷色拍ww47| 成人av集中营| 久久欧美一区二区| 久久精品国产亚洲高清剧情介绍| 欧美性生活影院| 亚洲另类春色校园小说| 成人在线视频一区二区| 国产三级欧美三级日产三级99| 热久久久久久久| 欧美亚洲日本国产| 亚洲日本在线观看| 99re这里都是精品| 日韩精品欧美成人高清一区二区| 91婷婷韩国欧美一区二区| 国产精品欧美经典| 成人av片在线观看| 国产精品麻豆视频| eeuss鲁片一区二区三区在线看| 国产欧美一区二区三区网站| 国产乱妇无码大片在线观看| 久久精品综合网| 成人av在线影院| 自拍偷拍国产精品| 色播五月激情综合网| 亚洲韩国精品一区| 欧美日韩精品一区二区三区蜜桃| 亚洲综合激情小说| 欧美精选一区二区| 看电视剧不卡顿的网站| 国产日韩欧美电影| 99久久久精品| 亚洲国产成人高清精品| 欧美丰满嫩嫩电影| 麻豆国产一区二区| 中文av一区特黄| 色婷婷av一区二区| 婷婷成人综合网| 日韩一级精品视频在线观看| 国产美女一区二区| 亚洲图片另类小说| 91麻豆国产福利在线观看| 午夜天堂影视香蕉久久| 亚洲精品在线一区二区| 99久久精品国产导航| 午夜国产精品影院在线观看| 久久蜜桃一区二区| 99精品久久免费看蜜臀剧情介绍| 亚洲午夜一区二区三区| 精品999在线播放| 在线视频你懂得一区| 蜜桃视频一区二区三区在线观看| 国产日韩精品一区二区三区 | 日韩网站在线看片你懂的| 国产精品1区2区3区| 亚洲一区二区三区小说| 久久品道一品道久久精品| 色综合色综合色综合色综合色综合| 五月婷婷激情综合| 亚洲综合免费观看高清完整版在线 | 久久久天堂av| 欧美性色综合网| 高清av一区二区| 日韩av一二三| 一区二区三区中文字幕在线观看| 欧美videossexotv100| 在线观看91精品国产入口| 高清不卡在线观看| 蜜桃久久av一区| 夜夜爽夜夜爽精品视频| 中文在线一区二区 | 麻豆成人91精品二区三区| 国产精品免费视频观看| 精品国产精品网麻豆系列| 欧美日韩一区二区在线观看| 成人做爰69片免费看网站| 奇米精品一区二区三区四区| 亚洲老司机在线| 国产亲近乱来精品视频| 日韩欧美aaaaaa| 在线综合视频播放| 91亚洲精品一区二区乱码| 国产乱码精品一品二品| 玖玖九九国产精品| 午夜精品久久久久久久久| 亚洲裸体在线观看| 亚洲三级久久久| 国产精品日韩成人| 国产区在线观看成人精品| 日韩欧美国产精品| 欧美精品18+| av在线不卡网| 国产亚洲成aⅴ人片在线观看 | 欧美中文字幕一区| 精品99一区二区| 欧美日韩精品专区| 欧美专区在线观看一区| 麻豆一区二区99久久久久| 中文字幕在线不卡一区 | 在线视频国内一区二区| 成人免费视频播放| 国产成人小视频| 极品少妇xxxx精品少妇| 久久国产日韩欧美精品| 免费观看在线综合色| 老司机精品视频线观看86| 日本vs亚洲vs韩国一区三区| 免费观看久久久4p| 麻豆精品久久久| 精品夜夜嗨av一区二区三区| 精品一区二区三区的国产在线播放| 日韩av网站免费在线| 精品无人码麻豆乱码1区2区 | 精品无人码麻豆乱码1区2区 | 欧美一区欧美二区| 日韩美一区二区三区| 欧美成人国产一区二区| 久久免费看少妇高潮| 欧美国产丝袜视频| 亚洲激情图片小说视频| 爽爽淫人综合网网站| 毛片av一区二区| 大胆欧美人体老妇| 色婷婷久久99综合精品jk白丝| 欧美无砖砖区免费| 欧美一区二区播放| 中文字幕免费观看一区| 亚洲精品视频一区| 免费人成网站在线观看欧美高清| 国产精品中文有码| 色呦呦国产精品| 欧美一卡二卡三卡四卡| 国产精品午夜电影| 亚洲成a天堂v人片| 国产中文字幕一区| 91蜜桃在线观看| 欧美一区二区三区免费视频 | 92精品国产成人观看免费| 91精品国产品国语在线不卡| 亚洲国产精品精华液ab| 亚洲一区在线免费观看| 国产精品69久久久久水密桃| 色成人在线视频| 久久精品亚洲一区二区三区浴池 | 国产精品888| 欧美日韩精品三区| 久久久777精品电影网影网| 一二三四社区欧美黄| 国产美女精品在线| 8x8x8国产精品| 自拍偷拍国产亚洲| 国产精品亚洲一区二区三区在线 | 欧美三级资源在线| 国产精品国产三级国产三级人妇| 国产suv精品一区二区883| 精品国产一区二区三区忘忧草 | 中文字幕在线观看一区二区| 亚洲电影在线播放| 欧美经典一区二区| 成人国产精品免费观看| 亚洲一线二线三线久久久| 日韩一区二区免费在线电影| 精品美女在线观看| 国产色婷婷亚洲99精品小说| 亚洲成人av电影在线| 色狠狠综合天天综合综合| 国产精品久久久久久久裸模| 久久国产精品色| 欧美美女视频在线观看| 亚洲黄色免费电影| 91在线小视频| 亚洲欧美在线另类| 成人精品视频一区二区三区| 精品1区2区在线观看| 日韩精品一级二级| 欧美午夜片在线观看| 亚洲激情在线播放| 精品国产一区二区亚洲人成毛片| av电影一区二区| 欧美成人一区二区三区片免费| 欧美一区午夜视频在线观看| 久久精品视频免费| 午夜精品久久久久久久蜜桃app| 91精品办公室少妇高潮对白| 中文字幕一区二区视频| 成人黄页毛片网站|