📄 com_moce.m
字号:
new_system([sys,'/',['MPSK mod',13,'baseband']])
set_param([sys,'/',['MPSK mod',13,'baseband']],'Location',[7,579,417,733])
add_block('built-in/Inport',[sys,'/',['MPSK mod',13,'baseband/in_1']])
set_param([sys,'/',['MPSK mod',13,'baseband/in_1']],...
'position',[10,65,30,85])
add_block('built-in/Outport',[sys,'/',['MPSK mod',13,'baseband/out_1']])
set_param([sys,'/',['MPSK mod',13,'baseband/out_1']],...
'position',[275,65,295,85])
% Subsystem ['MPSK mod',13,'baseband/MPSK map'].
new_system([sys,'/',['MPSK mod',13,'baseband/MPSK map']])
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map']],'Location',[71,474,419,648])
add_block('built-in/Constant',[sys,'/',['MPSK mod',13,'baseband/MPSK map/Multiple factor']])
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map/Multiple factor']],...
'Value','Sft',...
'position',[130,108,150,132])
add_block('built-in/Outport',[sys,'/',['MPSK mod',13,'baseband/MPSK map/out_1']])
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map/out_1']],...
'position',[310,85,330,105])
add_block('built-in/Product',[sys,'/',['MPSK mod',13,'baseband/MPSK map/Product']])
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map/Product']],...
'position',[235,76,260,109])
add_block('built-in/Zero-Order Hold',[sys,'/',['MPSK mod',13,'baseband/MPSK map/Zero-Order',13,'Hold1']])
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map/Zero-Order',13,'Hold1']],...
'Sample time','td',...
'position',[130,29,165,61])
add_block('built-in/Inport',[sys,'/',['MPSK mod',13,'baseband/MPSK map/in_1']])
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map/in_1']],...
'position',[60,35,80,55])
add_line([sys,'/',['MPSK mod',13,'baseband/MPSK map']],[155,120;200,120;200,100;230,100])
add_line([sys,'/',['MPSK mod',13,'baseband/MPSK map']],[265,95;305,95])
add_line([sys,'/',['MPSK mod',13,'baseband/MPSK map']],[85,45;125,45])
add_line([sys,'/',['MPSK mod',13,'baseband/MPSK map']],[170,45;200,45;200,85;230,85])
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map']],...
'Mask Display','MPSK\nmap',...
'Mask Type','MPSK map')
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map']],...
'Mask Dialogue','Map input digital signal to analog phase shift.|M-ary number (input integer in range [0, M-1]):|Input symbol interval and offset (sec):')
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map']],...
'Mask Translate','pi2=2*pi;Sft=pi2/@1;td=@2;')
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map']],...
'Mask Help','This block maps the input digital signal to the analog signal, which is ready for the PM modulation. The input are integers in the range [0, M-1], where M is the M-ary number. You can view the MPSK constellation using the MODMAP function.')
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map']],...
'Mask Entries','M\/td\/')
% Finished composite block ['MPSK mod',13,'baseband/MPSK map'].
set_param([sys,'/',['MPSK mod',13,'baseband/MPSK map']],...
'position',[55,53,135,97])
% Subsystem ['MPSK mod',13,'baseband/PM',13,'baseband'].
new_system([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']])
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],'Location',[320,489,688,666])
add_block('built-in/Inport',[sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/in_1']])
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/in_1']],...
'position',[35,50,55,70])
add_block('built-in/Fcn',[sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/cos']])
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/cos']],...
'Expr','cos(u)',...
'position',[155,46,210,74])
add_block('built-in/Fcn',[sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/sin']])
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/sin']],...
'Expr','sin(u)',...
'position',[155,106,210,134])
add_block('built-in/Outport',[sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/out_1']])
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/out_1']],...
'position',[315,60,335,80])
add_block('built-in/Mux',[sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/Mux']])
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband/Mux']],...
'inputs','2',...
'position',[250,51,285,84])
add_line([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],[60,60;150,60])
add_line([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],[130,60;130,120;150,120])
add_line([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],[215,120;230,120;230,75;245,75])
add_line([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],[290,70;310,70])
add_line([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],[215,60;245,60])
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],...
'Mask Display','plot(0,0,100,100,x,y,u,v);PM',...
'Mask Type','PM CE',...
'Mask Dialogue','Output the complex envelope of a PM\nmodulated signal.|Initial phase (rad):')
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],...
'Mask Translate','Ph=@1;pi2=2*pi;[x,y]=moduicon(3);[u,v]=cmplxicn(1,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],...
'Mask Help','This block outputs the complex envelope of the phase modulated signal. The output of this block is a complex signal.',...
'Mask Entries','Ph\/')
% Finished composite block ['MPSK mod',13,'baseband/PM',13,'baseband'].
set_param([sys,'/',['MPSK mod',13,'baseband/PM',13,'baseband']],...
'ForeGround',4,...
'position',[165,53,245,97])
add_line([sys,'/',['MPSK mod',13,'baseband']],[35,75;50,75])
add_line([sys,'/',['MPSK mod',13,'baseband']],[250,75;270,75])
add_line([sys,'/',['MPSK mod',13,'baseband']],[140,75;160,75])
set_param([sys,'/',['MPSK mod',13,'baseband']],...
'Mask Display','plot(0,0,100,100,x,y,u,v);MPSK',...
'Mask Type','Baseband MPSK modulation')
set_param([sys,'/',['MPSK mod',13,'baseband']],...
'Mask Dialogue','Output the complex envelope of the\nM-ary phase shift keying modulation.|M-ary number (input integers in the range [0, M-1]):|Symbol interval and offset (sec):|Initial phase (rad):')
set_param([sys,'/',['MPSK mod',13,'baseband']],...
'Mask Translate','M=@1;td=@2;Ph=@3;[x,y]=moduicon(7);[u,v]=cmplxicn(1,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['MPSK mod',13,'baseband']],...
'Mask Help','This block outputs the complex envelope of MPSK modulated signal. The inputs are integers in the range [0, M-1], where M is the M-ary number. When the symbol interval is a two-element vector, the second element is the offset (default 0). The block keeps a same input value in the symbol interval.')
set_param([sys,'/',['MPSK mod',13,'baseband']],...
'Mask Entries','16\/.2\/0\/')
% Finished composite block ['MPSK mod',13,'baseband'].
set_param([sys,'/',['MPSK mod',13,'baseband']],...
'position',[45,428,125,472])
% Subsystem ['Coh MFSK',13,'demod baseband'].
new_system([sys,'/',['Coh MFSK',13,'demod baseband']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband']],'Location',[28,542,447,677])
add_block('built-in/Inport',[sys,'/',['Coh MFSK',13,'demod baseband/in_1']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/in_1']],...
'position',[30,40,50,60])
add_block('built-in/Outport',[sys,'/',['Coh MFSK',13,'demod baseband/out_1']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/out_1']],...
'position',[360,40,380,60])
% Subsystem ['Coh MFSK',13,'demod baseband/Min//max index'].
new_system([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],'Location',[192,461,623,564])
add_block('built-in/S-Function',[sys,'/',['Coh MFSK',13,'demod baseband/Min//max index/Maximum']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index/Maximum']],...
'function name','arymimai',...
'parameters','mima',...
'position',[240,20,320,40])
add_block('built-in/Outport',[sys,'/',['Coh MFSK',13,'demod baseband/Min//max index/out_1']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index/out_1']],...
'position',[335,20,355,40])
add_block('built-in/Zero-Order Hold',[sys,'/',['Coh MFSK',13,'demod baseband/Min//max index/Zero-Order',13,'Hold']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index/Zero-Order',13,'Hold']],...
'Sample time','td',...
'position',[165,14,200,46])
add_block('built-in/Inport',[sys,'/',['Coh MFSK',13,'demod baseband/Min//max index/in_1']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index/in_1']],...
'position',[65,20,85,40])
add_line([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],[205,30;235,30])
add_line([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],[325,30;330,30])
add_line([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],[90,30;160,30])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],...
'Mask Display','Min/Max\ndemap',...
'Mask Type','Maximum/minimum index.')
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],...
'Mask Dialogue','Choose the index of the input vector with\nmax/min value at sampling point. Hold the\nvalue for the rest of the period.|Symbol interval (sec):|''max'' or ''min'':')
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],...
'Mask Translate','td=@1;mima=@2;')
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],...
'Mask Help','This block outputs the index of the vector element that has the maximum or minimum value in the input vector. The computation starts at the sampling time point. The block holds the value for the rest of the interval.')
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],...
'Mask Entries','td\/''max''\/')
% Finished composite block ['Coh MFSK',13,'demod baseband/Min//max index'].
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],...
'ForeGround',4,...
'position',[215,28,295,72])
% Subsystem ['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'corr baseband'].
new_system([sys,'/',['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'corr baseband']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'corr baseband']],'Location',[124,519,842,743])
add_block('built-in/Constant',[sys,'/',['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'corr baseband/Shift key']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'corr baseband/Shift key']],...
'Value','sft',...
'position',[60,48,80,72])
add_block('built-in/Sum',[sys,'/',['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'corr baseband/Sum1']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'corr baseband/Sum1']],...
'position',[265,77,290,108])
add_block('built-in/S-Function',[sys,'/',['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'corr baseband/Array sin']])
set_param([sys,'/',['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'corr baseband/Array sin']],...
'ForeGround',3,...
'function name','arysin',...
'parameters','''cos''',...
'position',[325,85,375,105])
add_block('built-in/Constant',[sys,'/',['Coh MFSK',13,'demod baseband/Coh MFSK demod',13,'co
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -