📄 tstam.m
字号:
'Mask Entries','1\/0\/')
% Finished composite block ['AM with',13,'Carrier1/Module',13,'Integrator'].
set_param([sys,'/',['AM with',13,'Carrier1/Module',13,'Integrator']],...
'position',[90,59,155,101])
add_block('built-in/Constant',[sys,'/',['AM with',13,'Carrier1/Constant']])
set_param([sys,'/',['AM with',13,'Carrier1/Constant']],...
'Value','Fc',...
'position',[40,70,60,90])
add_block('built-in/Fcn',[sys,'/',['AM with',13,'Carrier1/Fcn']])
set_param([sys,'/',['AM with',13,'Carrier1/Fcn']],...
'Expr','sin(u[1]*pi2+Ph)',...
'position',[190,66,310,94])
add_block('built-in/Outport',[sys,'/',['AM with',13,'Carrier1/out_1']])
set_param([sys,'/',['AM with',13,'Carrier1/out_1']],...
'position',[535,30,555,50])
add_block('built-in/Sum',[sys,'/',['AM with',13,'Carrier1/Sum']])
set_param([sys,'/',['AM with',13,'Carrier1/Sum']],...
'position',[440,30,460,50])
add_block('built-in/Inport',[sys,'/',['AM with',13,'Carrier1/in_1']])
set_param([sys,'/',['AM with',13,'Carrier1/in_1']],...
'position',[300,15,320,35])
add_block('built-in/Product',[sys,'/',['AM with',13,'Carrier1/Product']])
set_param([sys,'/',['AM with',13,'Carrier1/Product']],...
'position',[360,20,385,40])
add_line([sys,'/',['AM with',13,'Carrier1']],[465,40;530,40])
add_line([sys,'/',['AM with',13,'Carrier1']],[325,25;355,25])
add_line([sys,'/',['AM with',13,'Carrier1']],[390,30;405,30;405,35;435,35])
add_line([sys,'/',['AM with',13,'Carrier1']],[160,80;185,80])
add_line([sys,'/',['AM with',13,'Carrier1']],[65,80;85,80])
add_line([sys,'/',['AM with',13,'Carrier1']],[315,80;330,80;330,35;355,35])
add_line([sys,'/',['AM with',13,'Carrier1']],[330,80;425,80;435,45])
set_param([sys,'/',['AM with',13,'Carrier1']],...
'Mask Display','AM with\nCarrier',...
'Mask Type','AM with Carrier',...
'Mask Dialogue','Amplitude modulation with carrier:|Amplitude scale factor:|Carrier frequency:|Initial phase:')
set_param([sys,'/',['AM with',13,'Carrier1']],...
'Mask Translate','Ac=@1;Fc=@2;Ph=@3;pi2=2*pi;')
set_param([sys,'/',['AM with',13,'Carrier1']],...
'Mask Help','AM with Carrier. This block causes the amplitude of the sinusoid carrier to depend on the message signal plus the carrier signal. The modulated signal has added onto the carrier signal.')
set_param([sys,'/',['AM with',13,'Carrier1']],...
'Mask Entries','1\/100\/0\/')
% Finished composite block ['AM with',13,'Carrier1'].
set_param([sys,'/',['AM with',13,'Carrier1']],...
'position',[265,122,325,158])
% Subsystem ['ADM by',13,'Envelop detector'].
new_system([sys,'/',['ADM by',13,'Envelop detector']])
set_param([sys,'/',['ADM by',13,'Envelop detector']],'Location',[576,377,911,527])
add_block('built-in/Outport',[sys,'/',['ADM by',13,'Envelop detector/out_1']])
set_param([sys,'/',['ADM by',13,'Envelop detector/out_1']],...
'position',[290,30,310,50])
add_block('built-in/Sum',[sys,'/',['ADM by',13,'Envelop detector/Sum']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Sum']],...
'inputs','+-',...
'position',[240,30,260,50])
add_block('built-in/Inport',[sys,'/',['ADM by',13,'Envelop detector/in_1']])
set_param([sys,'/',['ADM by',13,'Envelop detector/in_1']],...
'position',[40,25,60,45])
% Subsystem ['ADM by',13,'Envelop detector/Envelop',13,'Detector'].
new_system([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],'Location',[86,374,774,617])
add_block('built-in/Gain',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Gain1']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Gain1']],...
'Gain','g',...
'position',[585,100,605,120])
add_block('built-in/Outport',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/out_1']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/out_1']],...
'position',[625,100,645,120])
add_block('built-in/Gain',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Gain']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Gain']],...
'Gain','g',...
'position',[65,100,85,120])
add_block('built-in/Inport',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/in_1']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/in_1']],...
'position',[15,100,35,120])
add_block('built-in/Switch',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Switch']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Switch']],...
'Threshold','eps',...
'position',[505,94,530,126])
add_block('built-in/Memory',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Memory']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Memory']],...
'position',[140,35,180,65])
add_block('built-in/Memory',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Memory2']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Memory2']],...
'orientation',2,...
'position',[495,155,535,185])
add_block('built-in/Relational Operator',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Relational',13,'Operator1']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Relational',13,'Operator1']],...
'Operator','>',...
'position',[385,98,415,122])
add_block('built-in/Memory',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Memory1']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Memory1']],...
'position',[300,125,340,155])
add_block('built-in/Relational Operator',[sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Relational',13,'Operator']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector/Relational',13,'Operator']],...
'position',[225,93,255,117])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[610,110;620,110])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[535,110;560,110;560,170;540,170])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[560,110;580,110])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[90,110;105,110;105,50;135,50])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[105,110;220,110])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[40,110;60,110])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[490,170;480,170;480,120;500,120])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[420,110;500,110])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[260,105;270,105;270,140;295,140])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[270,105;380,105])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[345,140;355,140;355,115;380,115])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[185,50;195,50;195,100;220,100])
add_line([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],[195,50;490,50;500,100])
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],...
'Mask Display','Envelop\nDetector',...
'Mask Type','Envelop Detector',...
'Mask Dialogue','Envelop Detector:|Boundary Side (''upper'' or ''lower''):')
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],...
'Mask Translate','x=@1;if length(x)<2, error(''Error in Envelop Detector''); end; x=x(1:2); g=1; if x==''lo'', g=-1; end;')
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],...
'Mask Help','Envelop Detector detects the envelop of a signal.',...
'Mask Entries','''upper''\/')
% Finished composite block ['ADM by',13,'Envelop detector/Envelop',13,'Detector'].
set_param([sys,'/',['ADM by',13,'Envelop detector/Envelop',13,'Detector']],...
'position',[110,16,175,54])
add_block('built-in/Constant',[sys,'/',['ADM by',13,'Envelop detector/Constant']])
set_param([sys,'/',['ADM by',13,'Envelop detector/Constant']],...
'Value','Ac',...
'position',[165,95,185,115])
add_line([sys,'/',['ADM by',13,'Envelop detector']],[265,40;285,40])
add_line([sys,'/',['ADM by',13,'Envelop detector']],[180,35;235,35])
add_line([sys,'/',['ADM by',13,'Envelop detector']],[65,35;105,35])
add_line([sys,'/',['ADM by',13,'Envelop detector']],[190,105;210,105;210,45;235,45])
set_param([sys,'/',['ADM by',13,'Envelop detector']],...
'Mask Display','ADM by\nenvelop',...
'Mask Type','AM with Carrier',...
'Mask Dialogue','Amplitude modulation with carrier:|Carrier amplitude:',...
'Mask Translate','Ac=@1;')
set_param([sys,'/',['ADM by',13,'Envelop detector']],...
'Mask Help','Amplitude Demodulation by Envelop. This block demodulates the Signal modulated using AM with Carrier method.',...
'Mask Entries','1\/')
% Finished composite block ['ADM by',13,'Envelop detector'].
set_param([sys,'/',['ADM by',13,'Envelop detector']],...
'orientation',2,...
'ForeGround',6,...
'position',[385,155,445,195])
% Subsystem ['Auto-Scale',13,'Graph1'].
new_system([sys,'/',['Auto-Scale',13,'Graph1']])
set_param([sys,'/',['Auto-Scale',13,'Graph1']],'Location',[0,59,274,252])
add_block('built-in/Inport',[sys,'/',['Auto-Scale',13,'Graph1/x']])
set_param([sys,'/',['Auto-Scale',13,'Graph1/x']],...
'position',[65,55,85,75])
add_block('built-in/S-Function',[sys,'/',['Auto-Scale',13,'Graph1/S-function',13,'M-file which plots',13,'lines',13,'']])
set_param([sys,'/',['Auto-Scale',13,'Graph1/S-function',13,'M-file which plots',13,'lines',13,'']],...
'function name','sfunyst',...
'parameters','ax, color, npts, dt',...
'position',[130,55,180,75])
add_line([sys,'/',['Auto-Scale',13,'Graph1']],[90,65;125,65])
set_param([sys,'/',['Auto-Scale',13,'Graph1']],...
'Mask Display','plot(0,0,100,100,[83,76,63,52,42,38,28,16,11,84,11,11,11,90,90,11],[75,58,47,54,72,80,84,74,65,65,65,90,40,40,90,90])',...
'Mask Type','Storage scope.')
set_param([sys,'/',['Auto-Scale',13,'Graph1']],...
'Mask Dialogue','Storage scope using MATLAB graph window.\nEnter plotting ranges and line type.|Initial Time Range:|Initial y-min:|Initial y-max:|Storage pts.:|Line type (rgbw-.:xo):|Sample time:')
set_param([sys,'/',['Auto-Scale',13,'Graph1']],...
'Mask Translate','npts = @4; color = @5; ax = [0, @1, @2, @3]; dt=@6;')
set_param([sys,'/',['Auto-Scale',13,'Graph1']],...
'Mask Help','Uses MATLAB''s graph window.\nUse only one block per system.\nLine type must be in quotes.\nSee the M-file sfunyst.m.')
set_param([sys,'/',['Auto-Scale',13,'Graph1']],...
'Mask Entries','.5\/-1.5\/1.5\/200\/''r-/y--/b-./g:/m-/ro/b+''\/0\/')
% Finished composite block ['Auto-Scale',13,'Graph1'].
set_param([sys,'/',['Auto-Scale',13,'Graph1']],...
'orientation',2,...
'position',[50,65,80,105])
% Subsystem ['DSB-SC-ADM',13,'by-pilot-carrier'].
new_system([sys,'/',['DSB-SC-ADM',13,'by-pilot-carrier']])
set_param([sys,'/',['DSB-SC-ADM',13,'by-pilot-carrier']],'Location',[91,464,741,629])
add_block('built-in/Note',[sys,'/',['DSB-SC-ADM',13,'by-pilot-carrier/Ref: Hambley: An Intro to Comm. Systems. pp67']])
set_param([sys,'/',['DSB-SC-ADM',13,'by-pilot-carrier/Ref: Hambley: An Intro to Comm. Systems. pp67']],...
'position',[615,300,620,305])
add_block('built-in/Inport',[sys,'/',['DSB-SC-ADM',13,'by-pilot-carrier/in_1']])
set_param([sys,'/',['DSB-SC-ADM',13,'by-pilot-carrier/in_1']],...
'position',[25,15,45,35])
add_block('built-in/Transfer Fcn',[sys,'/',['DSB-SC-ADM',13,'by-pilot-carrier/BandPassFilter',13,'pass Fc']])
set_param([sys,'/',['DSB-SC-ADM',13,'by-pilot-carrier/BandPassFilter',13,'pass Fc']],...
'Numerator','nb',...
'Denominator','db',...
'position',[95,68,145,102])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -