📄 compage1.m
字号:
function [ret,x0,str,ts,xts]=compage1(t,x,u,flag);
%COMPAGE1 is the M-file description of the SIMULINK system named COMPAGE1.
% The block-diagram can be displayed by typing: COMPAGE1.
%
% SYS=COMPAGE1(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 COMPAGE1 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 COMPAGE1 with a FLAG of zero:
% [SIZES]=COMPAGE1([],[],[],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',[124,77,892,496])
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', '')
add_block('built-in/Note',[sys,'/','COMMUNICATION TOOLBOX'])
set_param([sys,'/','COMMUNICATION TOOLBOX'],...
'ForeGround',2,...
'Font Weight','bold',...
'Font Size',14,...
'position',[435,21,440,26])
add_block('built-in/Note',[sys,'/','Systems to transmitting information from transmitting site to receiver site.'])
set_param([sys,'/','Systems to transmitting information from transmitting site to receiver site.'],...
'position',[480,76,485,81])
add_block('built-in/Note',[sys,'/','A collection of MATLAB functions and SIMULINK blocks for communication '])
set_param([sys,'/','A collection of MATLAB functions and SIMULINK blocks for communication '],...
'position',[495,136,500,141])
add_block('built-in/Note',[sys,'/','system design, simulation and analysis. There are some overlap and between'])
set_param([sys,'/','system design, simulation and analysis. There are some overlap and between'],...
'position',[500,156,505,161])
add_block('built-in/Note',[sys,'/','Communication Systems:'])
set_param([sys,'/','Communication Systems:'],...
'ForeGround',4,...
'Font Weight','bold',...
'position',[105,76,110,81])
add_block('built-in/Note',[sys,'/','About this On-Line Tutorial:'])
set_param([sys,'/','About this On-Line Tutorial:'],...
'ForeGround',4,...
'Font Name','helvetica',...
'Font Weight','bold',...
'position',[110,211,115,216])
add_block('built-in/Note',[sys,'/','The transmitted information can be analog signal or digital signal.'])
set_param([sys,'/','The transmitted information can be analog signal or digital signal.'],...
'position',[455,101,460,106])
add_block('built-in/Note',[sys,'/','Communications Toolbox:'])
set_param([sys,'/','Communications Toolbox:'],...
'ForeGround',4,...
'Font Weight','bold',...
'position',[105,136,110,141])
add_block('built-in/Note',[sys,'/','All cyan color block are blocks with examples '])
set_param([sys,'/','All cyan color block are blocks with examples '],...
'position',[410,216,415,221])
% Subsystem 'Click here1'.
new_system([sys,'/','Click here1'])
set_param([sys,'/','Click here1'],'Location',[380,422,702,464])
add_block('built-in/Note',[sys,'/','Click here1/Welcome to Communication toolbox.'])
set_param([sys,'/','Click here1/Welcome to Communication toolbox.'],...
'position',[150,10,155,15])
set_param([sys,'/','Click here1'],...
'Mask Display','.')
% Finished composite block 'Click here1'.
set_param([sys,'/','Click here1'],...
'BackGround',7,...
'hide name',0,...
'Font Angle','italic',...
'position',[580,216,650,244])
add_block('built-in/Note',[sys,'/','these two parts.'])
set_param([sys,'/','these two parts.'],...
'position',[320,176,325,181])
% Subsystem 'Receiver'.
new_system([sys,'/','Receiver'])
set_param([sys,'/','Receiver'],'Location',[384,427,663,590])
add_block('built-in/Outport',[sys,'/','Receiver/out_1'])
set_param([sys,'/','Receiver/out_1'],...
'orientation',2,...
'position',[80,50,100,70])
add_block('built-in/Inport',[sys,'/','Receiver/in_1'])
set_param([sys,'/','Receiver/in_1'],...
'orientation',2,...
'position',[215,50,235,70])
add_line([sys,'/','Receiver'],[210,60;105,60])
set_param([sys,'/','Receiver'],...
'Mask Display','Receiving\nprocess',...
'Mask Dialogue','eval(''com_trans;'')')
% Finished composite block 'Receiver'.
set_param([sys,'/','Receiver'],...
'hide name',0,...
'position',[570,270,650,320])
% Subsystem ['Store N',13,'Display'].
new_system([sys,'/',['Store N',13,'Display']])
set_param([sys,'/',['Store N',13,'Display']],'Location',[427,463,684,617])
add_block('built-in/Inport',[sys,'/',['Store N',13,'Display/in_1']])
set_param([sys,'/',['Store N',13,'Display/in_1']],...
'position',[55,45,75,65])
set_param([sys,'/',['Store N',13,'Display']],...
'Mask Display','Store N\nDisplay',...
'Mask Dialogue','eval(''com_sour;'');')
% Finished composite block ['Store N',13,'Display'].
set_param([sys,'/',['Store N',13,'Display']],...
'hide name',0,...
'position',[680,270,760,320])
add_block('built-in/Note',[sys,'/','General structure of'])
set_param([sys,'/','General structure of'],...
'ForeGround',4,...
'Font Weight','bold',...
'position',[80,286,85,291])
% Subsystem 'Source '.
new_system([sys,'/','Source '])
set_param([sys,'/','Source '],'Location',[185,105,363,240])
add_block('built-in/Outport',[sys,'/','Source /out_1'])
set_param([sys,'/','Source /out_1'],...
'position',[110,60,130,80])
set_param([sys,'/','Source '],...
'Mask Display','Source',...
'Mask Type','Source',...
'Mask Dialogue','eval(''com_sour;'')')
% Finished composite block 'Source '.
set_param([sys,'/','Source '],...
'hide name',0,...
'position',[240,270,320,320])
% Subsystem 'Transmitter'.
new_system([sys,'/','Transmitter'])
set_param([sys,'/','Transmitter'],'Location',[126,473,408,606])
add_block('built-in/Inport',[sys,'/','Transmitter/in_1'])
set_param([sys,'/','Transmitter/in_1'],...
'position',[35,45,55,65])
add_block('built-in/Outport',[sys,'/','Transmitter/out_1'])
set_param([sys,'/','Transmitter/out_1'],...
'position',[190,45,210,65])
add_line([sys,'/','Transmitter'],[60,55;185,55])
set_param([sys,'/','Transmitter'],...
'Mask Display','Transmiting\nprocess',...
'Mask Dialogue','eval(''com_trans;'')')
% Finished composite block 'Transmitter'.
set_param([sys,'/','Transmitter'],...
'hide name',0,...
'position',[350,270,430,320])
% Subsystem 'Channel'.
new_system([sys,'/','Channel'])
set_param([sys,'/','Channel'],'Location',[446,298,1025,565])
% Subsystem 'Channel/Sub-system4'.
new_system([sys,'/','Channel/Sub-system4'])
set_param([sys,'/','Channel/Sub-system4'],'Location',[586,358,1012,641])
add_block('built-in/Inport',[sys,'/','Channel/Sub-system4/in_1'])
set_param([sys,'/','Channel/Sub-system4/in_1'],...
'position',[35,135,55,155])
add_block('built-in/Outport',[sys,'/','Channel/Sub-system4/out_1'])
set_param([sys,'/','Channel/Sub-system4/out_1'],...
'position',[145,135,165,155])
add_line([sys,'/','Channel/Sub-system4'],[60,145;140,145])
set_param([sys,'/','Channel/Sub-system4'],...
'Mask Display','Loss')
% Finished composite block 'Channel/Sub-system4'.
set_param([sys,'/','Channel/Sub-system4'],...
'hide name',0,...
'position',[165,73,235,117])
add_block('built-in/Inport',[sys,'/','Channel/in_1'])
set_param([sys,'/','Channel/in_1'],...
'position',[35,85,55,105])
% Subsystem 'Channel/Sub-system5'.
new_system([sys,'/','Channel/Sub-system5'])
set_param([sys,'/','Channel/Sub-system5'],'Location',[213,332,807,610])
% Subsystem 'Channel/Sub-system5/Sub-system5'.
new_system([sys,'/','Channel/Sub-system5/Sub-system5'])
set_param([sys,'/','Channel/Sub-system5/Sub-system5'],'Location',[196,225,790,503])
add_block('built-in/Outport',[sys,'/','Channel/Sub-system5/Sub-system5/out_1'])
set_param([sys,'/','Channel/Sub-system5/Sub-system5/out_1'],...
'position',[395,35,415,55])
set_param([sys,'/','Channel/Sub-system5/Sub-system5'],...
'Mask Display','Intersymbol Interference')
% Finished composite block 'Channel/Sub-system5/Sub-system5'.
set_param([sys,'/','Channel/Sub-system5/Sub-system5'],...
'hide name',0,...
'position',[30,25,200,65])
% Subsystem 'Channel/Sub-system5/Sub-system6'.
new_system([sys,'/','Channel/Sub-system5/Sub-system6'])
set_param([sys,'/','Channel/Sub-system5/Sub-system6'],'Location',[196,225,790,503])
add_block('built-in/Outport',[sys,'/','Channel/Sub-system5/Sub-system6/out_1'])
set_param([sys,'/','Channel/Sub-system5/Sub-system6/out_1'],...
'position',[395,35,415,55])
set_param([sys,'/','Channel/Sub-system5/Sub-system6'],...
'Mask Display','Adjacent channel interference')
% Finished composite block 'Channel/Sub-system5/Sub-system6'.
set_param([sys,'/','Channel/Sub-system5/Sub-system6'],...
'hide name',0,...
'position',[30,82,200,118])
% Subsystem 'Channel/Sub-system5/Sub-system7'.
new_system([sys,'/','Channel/Sub-system5/Sub-system7'])
set_param([sys,'/','Channel/Sub-system5/Sub-system7'],'Location',[196,225,790,503])
add_block('built-in/Outport',[sys,'/','Channel/Sub-system5/Sub-system7/out_1'])
set_param([sys,'/','Channel/Sub-system5/Sub-system7/out_1'],...
'position',[395,35,415,55])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -