📄 comhelp.m
字号:
function [ret,x0,str,ts,xts]=comhelp(t,x,u,flag);
%COMHELP is the M-file description of the SIMULINK system named COMHELP.
% The block-diagram can be displayed by typing: COMHELP.
%
% SYS=COMHELP(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 COMHELP 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 COMHELP with a FLAG of zero:
% [SIZES]=COMHELP([],[],[],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',[10,673,971,742])
open_system(sys)
end;
set_param(sys,'algorithm', 'RK-45')
set_param(sys,'Start time', '0.0')
set_param(sys,'Stop time', '999999')
set_param(sys,'Min step size', '0.0001')
set_param(sys,'Max step size', '10')
set_param(sys,'Relative error','1e-3')
set_param(sys,'Return vars', '')
% Subsystem 'Click_here3'.
new_system([sys,'/','Click_here3'])
set_param([sys,'/','Click_here3'],'Location',[136,230,381,439])
set_param([sys,'/','Click_here3'],...
'Mask Display','Close page 1',...
'Mask Dialogue','eval(''if exist(''''compage1''''), bdclose(''''compage1''''); end;'')')
% Finished composite block 'Click_here3'.
set_param([sys,'/','Click_here3'],...
'ForeGround',6,...
'hide name',0,...
'Font Angle','italic',...
'position',[20,40,120,66])
% Subsystem 'Click_here4'.
new_system([sys,'/','Click_here4'])
set_param([sys,'/','Click_here4'],'Location',[136,230,381,439])
set_param([sys,'/','Click_here4'],...
'Mask Display','Tutorial page 1',...
'Mask Dialogue','eval(''compage1'')')
% Finished composite block 'Click_here4'.
set_param([sys,'/','Click_here4'],...
'ForeGround',6,...
'hide name',0,...
'Font Angle','italic',...
'position',[20,10,120,36])
% Subsystem 'Click_here1'.
new_system([sys,'/','Click_here1'])
set_param([sys,'/','Click_here1'],'Location',[136,230,381,439])
set_param([sys,'/','Click_here1'],...
'Mask Display','Tutorial page 2',...
'Mask Dialogue','eval(''compage2'')')
% Finished composite block 'Click_here1'.
set_param([sys,'/','Click_here1'],...
'ForeGround',6,...
'hide name',0,...
'Font Angle','italic',...
'position',[130,10,230,36])
% Subsystem 'Click_here2'.
new_system([sys,'/','Click_here2'])
set_param([sys,'/','Click_here2'],'Location',[136,230,381,439])
set_param([sys,'/','Click_here2'],...
'Mask Display','Close page 2',...
'Mask Dialogue','eval(''if exist(''''compage2''''), bdclose(''''compage2''''); end;close all'')')
% Finished composite block 'Click_here2'.
set_param([sys,'/','Click_here2'],...
'ForeGround',6,...
'hide name',0,...
'Font Angle','italic',...
'position',[130,40,230,66])
% Subsystem 'Click_here6'.
new_system([sys,'/','Click_here6'])
set_param([sys,'/','Click_here6'],'Location',[136,230,381,439])
set_param([sys,'/','Click_here6'],...
'Mask Display','Tutorial page 3',...
'Mask Dialogue','eval(''compage3'')')
% Finished composite block 'Click_here6'.
set_param([sys,'/','Click_here6'],...
'ForeGround',6,...
'hide name',0,...
'Font Angle','italic',...
'position',[245,10,345,36])
% Subsystem 'Click_here5'.
new_system([sys,'/','Click_here5'])
set_param([sys,'/','Click_here5'],'Location',[136,230,381,439])
set_param([sys,'/','Click_here5'],...
'Mask Display','Close page 2',...
'Mask Dialogue','eval(''if exist(''''compage3''''), bdclose(''''compage3''''); end;if exist(''''tutbchcd''''),bdclose(''''tutbchcd'''');end;'')')
% Finished composite block 'Click_here5'.
set_param([sys,'/','Click_here5'],...
'ForeGround',6,...
'hide name',0,...
'Font Angle','italic',...
'position',[245,40,345,66])
drawnow
% Return any arguments.
if (nargin | nargout)
% Must use feval here to access system in memory
if (nargin > 3)
if (flag == 0)
eval(['[ret,x0,str,ts,xts]=',sys,'(t,x,u,flag);'])
else
eval(['ret =', sys,'(t,x,u,flag);'])
end
else
[ret,x0,str,ts,xts] = feval(sys);
end
else
drawnow % Flash up the model and execute load callback
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -