?? enzyme1.m
字號:
function [ret,x0,str,ts,xts]=enzyme1(t,x,u,flag);
%ENZYME1 is the M-file description of the SIMULINK system named ENZYME1.
% The block-diagram can be displayed by typing: ENZYME1.
%
% SYS=ENZYME1(T,X,U,FLAG) returns depending on FLAG certain
% system values given time point, T, current state vector, X,
% and input vector, U.
% FLAG is used to indicate the type of output to be returned in SYS.
%
% Setting FLAG=1 causes ENZYME1 to return state derivatives, FLAG=2
% discrete states, FLAG=3 system outputs and FLAG=4 next sample
% time. For more information and other options see SFUNC.
%
% Calling ENZYME1 with a FLAG of zero:
% [SIZES]=ENZYME1([],[],[],0), returns a vector, SIZES, which
% contains the sizes of the state vector and other parameters.
% SIZES(1) number of states
% SIZES(2) number of discrete states
% SIZES(3) number of outputs
% SIZES(4) number of inputs
% SIZES(5) number of roots (currently unsupported)
% SIZES(6) direct feedthrough flag
% SIZES(7) number of sample times
%
% For the definition of other parameters in SIZES, see SFUNC.
% See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.
% Note: This M-file is only used for saving graphical information;
% after the model is loaded into memory an internal model
% representation is used.
% the system will take on the name of this mfile:
sys = mfilename;
new_system(sys)
simver(1.3)
if (0 == (nargin + nargout))
set_param(sys,'Location',[4,42,788,479])
open_system(sys)
end;
set_param(sys,'algorithm', 'Adams/Gear')
set_param(sys,'Start time', '0.0')
set_param(sys,'Stop time', '16000')
set_param(sys,'Min step size', '0.001')
set_param(sys,'Max step size', '0.2')
set_param(sys,'Relative error','1e-3')
set_param(sys,'Return vars', '')
set_param(sys,'AssignWideVectorLines','on');
add_block('built-in/To Workspace',[sys,'/','To Workspace1'])
set_param([sys,'/','To Workspace1'],...
'ForeGround',4,...
'mat-name','gamma',...
'buffer','[8000,1,1]',...
'position',[595,212,645,228])
add_block('built-in/Integrator',[sys,'/','gamma'])
set_param([sys,'/','gamma'],...
'ForeGround',4,...
'move name',0,...
'Drop Shadow',4,...
'position',[465,210,485,230])
add_block('built-in/To Workspace',[sys,'/','To Workspace'])
set_param([sys,'/','To Workspace'],...
'ForeGround',2,...
'mat-name','alpha',...
'buffer','[8000,1,1]',...
'position',[590,137,640,153])
add_block('built-in/Integrator',[sys,'/','alpha'])
set_param([sys,'/','alpha'],...
'ForeGround',2,...
'move name',0,...
'Drop Shadow',4,...
'position',[460,135,480,155])
add_block('built-in/Sum',[sys,'/','Sum'])
set_param([sys,'/','Sum'],...
'ForeGround',2,...
'inputs','++-',...
'position',[365,107,385,143])
add_block('built-in/Fcn',[sys,'/','Sigma-i*Fn'])
set_param([sys,'/','Sigma-i*Fn'],...
'orientation',2,...
'ForeGround',3,...
'Expr','1.3*u^4/(10^4+u^4)',...
'position',[455,45,495,65])
add_block('built-in/Sum',[sys,'/','Sum1'])
set_param([sys,'/','Sum1'],...
'ForeGround',4,...
'inputs','+--',...
'position',[365,217,385,253])
add_block('built-in/Gain',[sys,'/','ks'])
set_param([sys,'/','ks'],...
'ForeGround',4,...
'Gain','.06',...
'position',[195,222,220,248])
add_block('built-in/To Workspace',[sys,'/','To Workspace2'])
set_param([sys,'/','To Workspace2'],...
'BackGround',7,...
'mat-name','v',...
'buffer','[8000,1,1]',...
'position',[595,7,645,23])
add_block('built-in/Scope',[sys,'/','alpha_scope'])
set_param([sys,'/','alpha_scope'],...
'Vgain','120.000000',...
'Hgain','1000.000000',...
'Vmax','240.000000',...
'Hmax','2000.000000',...
'Window',[667,492,787,595])
open_system([sys,'/','alpha_scope'])
set_param([sys,'/','alpha_scope'],...
'position',[700,95,730,125])
add_block('built-in/Scope',[sys,'/','gamma_scope'])
set_param([sys,'/','gamma_scope'],...
'Vgain','400.000000',...
'Hgain','1000.000000',...
'Vmax','800.000000',...
'Hmax','2000.000000',...
'Window',[532,493,660,595])
open_system([sys,'/','gamma_scope'])
set_param([sys,'/','gamma_scope'],...
'position',[705,240,735,270])
add_block('built-in/Gain',[sys,'/','SigmaM'])
set_param([sys,'/','SigmaM'],...
'orientation',2,...
'ForeGround',6,...
'Gain','10.',...
'position',[390,322,415,348])
add_block('built-in/Gain',[sys,'/','q'])
set_param([sys,'/','q'],...
'orientation',2,...
'ForeGround',6,...
'position',[345,277,370,303])
% Subsystem 'Phi'.
new_system([sys,'/','Phi'])
set_param([sys,'/','Phi'],'Location',[-5,363,600,603])
add_block('built-in/Product',[sys,'/','Phi/Product1'])
set_param([sys,'/','Phi/Product1'],...
'inputs','3',...
'position',[445,57,475,93])
add_block('built-in/Product',[sys,'/','Phi/Phi'])
set_param([sys,'/','Phi/Phi'],...
'ForeGround',6,...
'position',[535,108,565,132])
add_block('built-in/Fcn',[sys,'/','Phi/Fcn3'])
set_param([sys,'/','Phi/Fcn3'],...
'Expr','1/u',...
'position',[445,145,485,165])
add_block('built-in/Constant',[sys,'/','Phi/L'])
set_param([sys,'/','Phi/L'],...
'Value','5000000',...
'position',[285,175,305,195])
add_block('built-in/Sum',[sys,'/','Phi/Sum2'])
set_param([sys,'/','Phi/Sum2'],...
'inputs','+++',...
'position',[350,97,370,133])
add_block('built-in/Fcn',[sys,'/','Phi/Fcn2'])
set_param([sys,'/','Phi/Fcn2'],...
'Expr','u*u',...
'position',[255,125,295,145])
add_block('built-in/Fcn',[sys,'/','Phi/Fcn1'])
set_param([sys,'/','Phi/Fcn1'],...
'Expr','u*u',...
'position',[255,70,295,90])
add_block('built-in/Constant',[sys,'/','Phi/One'])
set_param([sys,'/','Phi/One'],...
'position',[55,105,75,125])
add_block('built-in/Sum',[sys,'/','Phi/1+gamma'])
set_param([sys,'/','Phi/1+gamma'],...
'position',[150,135,170,155])
add_block('built-in/Sum',[sys,'/','Phi/1+alpha'])
set_param([sys,'/','Phi/1+alpha'],...
'position',[150,80,170,100])
add_block('built-in/Inport',[sys,'/','Phi/in_1'])
set_param([sys,'/','Phi/in_1'],...
'position',[95,30,115,50])
add_block('built-in/Outport',[sys,'/','Phi/out_1'])
set_param([sys,'/','Phi/out_1'],...
'position',[585,110,605,130])
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -