📄 com_pres.m
字号:
function [ret,x0,str,ts,xts]=com_pres(t,x,u,flag);
%COM_PRES is the M-file description of the SIMULINK system named COM_PRES.
% The block-diagram can be displayed by typing: COM_PRES.
%
% SYS=COM_PRES(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 COM_PRES 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 COM_PRES with a FLAG of zero:
% [SIZES]=COM_PRES([],[],[],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',[199,78,1102,873])
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,'/','COMMUNICATIONS TOOLBOX'])
set_param([sys,'/','COMMUNICATIONS TOOLBOX'],...
'ForeGround',2,...
'Font Weight','bold',...
'Font Size',14,...
'position',[435,20,440,25])
add_block('built-in/Note',[sys,'/','these two parts.'])
set_param([sys,'/','these two parts.'],...
'position',[285,175,290,180])
% Subsystem 'Channel1'.
new_system([sys,'/','Channel1'])
set_param([sys,'/','Channel1'],'Location',[446,298,1025,565])
add_block('built-in/Outport',[sys,'/','Channel1/out_1'])
set_param([sys,'/','Channel1/out_1'],...
'position',[455,85,475,105])
add_block('built-in/Sum',[sys,'/','Channel1/Sum'])
set_param([sys,'/','Channel1/Sum'],...
'inputs','+++',...
'position',[340,77,360,113])
% Subsystem 'Channel1/Sub-system1'.
new_system([sys,'/','Channel1/Sub-system1'])
set_param([sys,'/','Channel1/Sub-system1'],'Location',[575,99,983,538])
add_block('built-in/Sum',[sys,'/','Channel1/Sub-system1/Sum'])
set_param([sys,'/','Channel1/Sub-system1/Sum'],...
'inputs','+++',...
'position',[325,207,345,243])
add_block('built-in/Outport',[sys,'/','Channel1/Sub-system1/out_1'])
set_param([sys,'/','Channel1/Sub-system1/out_1'],...
'position',[365,215,385,235])
add_block('built-in/Mux',[sys,'/','Channel1/Sub-system1/Mux2'])
set_param([sys,'/','Channel1/Sub-system1/Mux2'],...
'inputs','2',...
'position',[235,321,270,354])
add_block('built-in/Mux',[sys,'/','Channel1/Sub-system1/Mux1'])
set_param([sys,'/','Channel1/Sub-system1/Mux1'],...
'inputs','2',...
'position',[230,81,265,114])
add_block('built-in/Mux',[sys,'/','Channel1/Sub-system1/Mux'])
set_param([sys,'/','Channel1/Sub-system1/Mux'],...
'inputs','2',...
'position',[220,206,255,239])
% Subsystem 'Channel1/Sub-system1/Sub-system6'.
new_system([sys,'/','Channel1/Sub-system1/Sub-system6'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system6'],'Location',[568,271,976,714])
add_block('built-in/Constant',[sys,'/','Channel1/Sub-system1/Sub-system6/Switch Key'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system6/Switch Key'],...
'position',[65,85,85,105])
add_block('built-in/Outport',[sys,'/','Channel1/Sub-system1/Sub-system6/out_1'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system6/out_1'],...
'position',[295,85,315,105])
add_line([sys,'/','Channel1/Sub-system1/Sub-system6'],[90,95;290,95])
set_param([sys,'/','Channel1/Sub-system1/Sub-system6'],...
'Mask Display','Receiver Noise')
% Finished composite block 'Channel1/Sub-system1/Sub-system6'.
set_param([sys,'/','Channel1/Sub-system1/Sub-system6'],...
'hide name',0,...
'position',[30,361,135,409])
% Subsystem 'Channel1/Sub-system1/Sub-system5'.
new_system([sys,'/','Channel1/Sub-system1/Sub-system5'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system5'],'Location',[568,271,976,714])
add_block('built-in/Constant',[sys,'/','Channel1/Sub-system1/Sub-system5/Switch Key'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system5/Switch Key'],...
'position',[100,85,120,105])
add_block('built-in/Outport',[sys,'/','Channel1/Sub-system1/Sub-system5/out_1'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system5/out_1'],...
'position',[295,85,315,105])
add_line([sys,'/','Channel1/Sub-system1/Sub-system5'],[125,95;290,95])
set_param([sys,'/','Channel1/Sub-system1/Sub-system5'],...
'Mask Display','Terrestrial Noise')
% Finished composite block 'Channel1/Sub-system1/Sub-system5'.
set_param([sys,'/','Channel1/Sub-system1/Sub-system5'],...
'hide name',0,...
'position',[30,291,135,339])
% Subsystem 'Channel1/Sub-system1/Sub-system4'.
new_system([sys,'/','Channel1/Sub-system1/Sub-system4'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system4'],'Location',[568,271,976,714])
add_block('built-in/Constant',[sys,'/','Channel1/Sub-system1/Sub-system4/Switch Key'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system4/Switch Key'],...
'Value','2',...
'position',[95,80,115,100])
add_block('built-in/Outport',[sys,'/','Channel1/Sub-system1/Sub-system4/out_1'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system4/out_1'],...
'position',[295,85,315,105])
add_line([sys,'/','Channel1/Sub-system1/Sub-system4'],[120,90;200,90;200,95;290,95])
set_param([sys,'/','Channel1/Sub-system1/Sub-system4'],...
'Mask Display','IM Noise')
% Finished composite block 'Channel1/Sub-system1/Sub-system4'.
set_param([sys,'/','Channel1/Sub-system1/Sub-system4'],...
'hide name',0,...
'position',[30,231,135,279])
% Subsystem 'Channel1/Sub-system1/Sub-system3'.
new_system([sys,'/','Channel1/Sub-system1/Sub-system3'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system3'],'Location',[568,271,976,714])
add_block('built-in/Constant',[sys,'/','Channel1/Sub-system1/Sub-system3/Switch Key'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system3/Switch Key'],...
'position',[110,85,130,105])
add_block('built-in/Outport',[sys,'/','Channel1/Sub-system1/Sub-system3/out_1'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system3/out_1'],...
'position',[295,85,315,105])
add_line([sys,'/','Channel1/Sub-system1/Sub-system3'],[135,95;290,95])
set_param([sys,'/','Channel1/Sub-system1/Sub-system3'],...
'Mask Display','Atmosphere Noise')
% Finished composite block 'Channel1/Sub-system1/Sub-system3'.
set_param([sys,'/','Channel1/Sub-system1/Sub-system3'],...
'hide name',0,...
'position',[30,171,135,219])
% Subsystem 'Channel1/Sub-system1/Sub-system2'.
new_system([sys,'/','Channel1/Sub-system1/Sub-system2'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system2'],'Location',[568,271,976,714])
add_block('built-in/Constant',[sys,'/','Channel1/Sub-system1/Sub-system2/Switch Key'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system2/Switch Key'],...
'position',[130,85,150,105])
add_block('built-in/Outport',[sys,'/','Channel1/Sub-system1/Sub-system2/out_1'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system2/out_1'],...
'position',[295,85,315,105])
add_line([sys,'/','Channel1/Sub-system1/Sub-system2'],[155,95;290,95])
set_param([sys,'/','Channel1/Sub-system1/Sub-system2'],...
'Mask Display','Random Noise')
% Finished composite block 'Channel1/Sub-system1/Sub-system2'.
set_param([sys,'/','Channel1/Sub-system1/Sub-system2'],...
'hide name',0,...
'position',[30,101,120,149])
% Subsystem 'Channel1/Sub-system1/Sub-system1'.
new_system([sys,'/','Channel1/Sub-system1/Sub-system1'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system1'],'Location',[185,298,593,741])
add_block('built-in/Constant',[sys,'/','Channel1/Sub-system1/Sub-system1/Switch Key'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system1/Switch Key'],...
'position',[115,100,135,120])
add_block('built-in/Outport',[sys,'/','Channel1/Sub-system1/Sub-system1/out_1'])
set_param([sys,'/','Channel1/Sub-system1/Sub-system1/out_1'],...
'position',[295,85,315,105])
add_line([sys,'/','Channel1/Sub-system1/Sub-system1'],[140,110;210,110;210,95;290,95])
set_param([sys,'/','Channel1/Sub-system1/Sub-system1'],...
'Mask Display','LO phase noise')
% Finished composite block 'Channel1/Sub-system1/Sub-system1'.
set_param([sys,'/','Channel1/Sub-system1/Sub-system1'],...
'hide name',0,...
'position',[30,26,120,74])
add_line([sys,'/','Channel1/Sub-system1'],[350,225;360,225])
add_line([sys,'/','Channel1/Sub-system1'],[275,340;280,340;280,235;320,235])
add_line([sys,'/','Channel1/Sub-system1'],[260,225;320,225])
add_line([sys,'/','Channel1/Sub-system1'],[270,100;280,100;280,215;320,215])
add_line([sys,'/','Channel1/Sub-system1'],[140,385;180,385;180,345;230,345])
add_line([sys,'/','Channel1/Sub-system1'],[140,315;180,315;180,330;230,330])
add_line([sys,'/','Channel1/Sub-system1'],[140,255;170,255;170,230;215,230])
add_line([sys,'/','Channel1/Sub-system1'],[140,195;170,195;170,215;215,215])
add_line([sys,'/','Channel1/Sub-system1'],[125,125;170,125;170,105;225,105])
add_line([sys,'/','Channel1/Sub-system1'],[125,50;170,50;170,90;225,90])
set_param([sys,'/','Channel1/Sub-system1'],...
'Mask Display','Noise')
% Finished composite block 'Channel1/Sub-system1'.
set_param([sys,'/','Channel1/Sub-system1'],...
'hide name',0,...
'position',[165,10,235,60])
add_block('built-in/Note',[sys,'/','Channel1/Fiber Optic Communications'])
set_param([sys,'/','Channel1/Fiber Optic Communications'],...
'position',[80,240,85,245])
add_block('built-in/Note',[sys,'/','Channel1/Satellite Communications'])
set_param([sys,'/','Channel1/Satellite Communications'],...
'position',[70,215,75,220])
% Subsystem 'Channel1/Sub-system5'.
new_system([sys,'/','Channel1/Sub-system5'])
set_param([sys,'/','Channel1/Sub-system5'],'Location',[213,332,807,610])
add_block('built-in/Outport',[sys,'/','Channel1/Sub-system5/out_1'])
set_param([sys,'/','Channel1/Sub-system5/out_1'],...
'position',[395,55,415,75])
add_block('built-in/Mux',[sys,'/','Channel1/Sub-system5/Mux'])
set_param([sys,'/','Channel1/Sub-system5/Mux'],...
'inputs','2',...
'position',[270,46,305,79])
% Subsystem 'Channel1/Sub-system5/Sub-system7'.
new_system([sys,'/','Channel1/Sub-system5/Sub-system7'])
set_param([sys,'/','Channel1/Sub-system5/Sub-system7'],'Location',[196,225,790,503])
add_block('built-in/Outport',[sys,'/','Channel1/Sub-system5/Sub-system7/out_1'])
set_param([sys,'/','Channel1/Sub-system5/Sub-system7/out_1'],...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -