?? tcemmpsk.m
字號:
add_line([sys,'/',['MPSK mod',13,'baseband/MPSK map']],[265,95;305,95])
add_line([sys,'/',['MPSK mod',13,'baseband/MPSK map']],[155,120;200,120;200,100;230,100])
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])
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])
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_line([sys,'/',['MPSK mod',13,'baseband']],[140,75;160,75])
add_line([sys,'/',['MPSK mod',13,'baseband']],[250,75;270,75])
add_line([sys,'/',['MPSK mod',13,'baseband']],[35,75;50,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','M\/td\/0\/')
% Finished composite block ['MPSK mod',13,'baseband'].
set_param([sys,'/',['MPSK mod',13,'baseband']],...
'hide name',0,...
'position',[140,68,220,112])
% Subsystem ['Rayleigh fading',13,'channel'].
new_system([sys,'/',['Rayleigh fading',13,'channel']])
set_param([sys,'/',['Rayleigh fading',13,'channel']],'Location',[476,508,847,748])
add_block('built-in/Outport',[sys,'/',['Rayleigh fading',13,'channel/out_1']])
set_param([sys,'/',['Rayleigh fading',13,'channel/out_1']],...
'position',[290,125,310,145])
add_block('built-in/Mux',[sys,'/',['Rayleigh fading',13,'channel/Mux']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Mux']],...
'inputs','2',...
'position',[220,116,255,149])
% Subsystem ['Rayleigh fading',13,'channel/Inner',13,'Product1'].
new_system([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1']],'Location',[33,479,253,634])
add_block('built-in/Product',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/Product']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/Product']],...
'position',[65,55,90,75])
add_block('built-in/Sum',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/Sum']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/Sum']],...
'inputs','+',...
'position',[125,55,145,75])
add_block('built-in/Outport',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/out_1']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/out_1']],...
'position',[185,55,205,75])
add_block('built-in/Inport',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/in_2']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/in_2']],...
'Port','2',...
'position',[15,90,35,110])
add_block('built-in/Inport',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/in_1']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1/in_1']],...
'position',[15,25,35,45])
add_line([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1']],[40,100;60,70])
add_line([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1']],[40,35;60,60])
add_line([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1']],[95,65;120,65])
add_line([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1']],[150,65;180,65])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1']],...
'Mask Display','.\n',...
'Mask Type','Dot Product',...
'Mask Dialogue','Inner (dot) product.\ny=sum(u1.*u2)')
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1']],...
'Mask Help','Computes the inner (dot) product of the inputs: sum(u1.*u2). The inputs are vectors of the same length. Output is a scalar.')
% Finished composite block ['Rayleigh fading',13,'channel/Inner',13,'Product1'].
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product1']],...
'position',[150,154,170,176])
add_block('built-in/Constant',[sys,'/',['Rayleigh fading',13,'channel/Constant1']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Constant1']],...
'Value','[quad, in_p]',...
'position',[30,155,105,185])
% Subsystem ['Rayleigh fading',13,'channel/Inner',13,'Product'].
new_system([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product']],'Location',[33,479,253,634])
add_block('built-in/Inport',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/in_1']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/in_1']],...
'position',[15,25,35,45])
add_block('built-in/Inport',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/in_2']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/in_2']],...
'Port','2',...
'position',[15,90,35,110])
add_block('built-in/Outport',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/out_1']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/out_1']],...
'position',[185,55,205,75])
add_block('built-in/Sum',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/Sum']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/Sum']],...
'inputs','+',...
'position',[125,55,145,75])
add_block('built-in/Product',[sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/Product']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product/Product']],...
'position',[65,55,90,75])
add_line([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product']],[150,65;180,65])
add_line([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product']],[95,65;120,65])
add_line([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product']],[40,35;60,60])
add_line([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product']],[40,100;60,70])
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product']],...
'Mask Display','.\n',...
'Mask Type','Dot Product',...
'Mask Dialogue','Inner (dot) product.\ny=sum(u1.*u2)')
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product']],...
'Mask Help','Computes the inner (dot) product of the inputs: sum(u1.*u2). The inputs are vectors of the same length. Output is a scalar.')
% Finished composite block ['Rayleigh fading',13,'channel/Inner',13,'Product'].
set_param([sys,'/',['Rayleigh fading',13,'channel/Inner',13,'Product']],...
'position',[150,69,170,91])
add_block('built-in/Constant',[sys,'/',['Rayleigh fading',13,'channel/Constant']])
set_param([sys,'/',['Rayleigh fading',13,'channel/Constant']],...
'Value','[in_p, -quad]',...
'position',[30,70,105,100])
add_block('built-in/Inport',[sys,'/',['Rayleigh fading',13,'channel/in_1']])
set_param([sys,'/',['Rayleigh fading',13,'channel/in_1']],...
'position',[30,20,50,40])
add_line([sys,'/',['Rayleigh fading',13,'channel']],[260,135;285,135])
add_line([sys,'/',['Rayleigh fading',13,'channel']],[175,165;190,165;190,140;215,140])
add_line([sys,'/',['Rayleigh fading',13,'channel']],[175,80;190,80;190,125;215,125])
add_line([sys,'/',['Rayleigh fading',13,'channel']],[55,30;120,30;120,75;145,75])
add_line([sys,'/',['Rayleigh fading',13,'channel']],[120,75;120,160;145,160])
add_line([sys,'/',['Rayleigh fading',13,'channel']],[110,170;145,170])
add_line([sys,'/',['Rayleigh fading',13,'channel']],[110,85;145,85])
set_param([sys,'/',['Rayleigh fading',13,'channel']],...
'Mask Display','plot(0,0,100,100,x,y,v,w,u,z);Rayl F',...
'Mask Type','Rayleigh fading channel, fixed parameter')
set_param([sys,'/',['Rayleigh fading',13,'channel']],...
'Mask Dialogue','Rayleigh fading channel with fixed\nfading envelope and phase shift.|Rayleigh fading envelope:|Phase shift of the channel (rad):')
set_param([sys,'/',['Rayleigh fading',13,'channel']],...
'Mask Translate','a=@1;b=@2;in_p=a*cos(b);quad=a*sin(b);[x,y]=chanicon;[v,w]=cmplxicn(0,50,get_param(gcb,''orientation''));[u,z]=cmplxicn(1,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['Rayleigh fading',13,'channel']],...
'Mask Help','This block applies the fading and phase shifting to the transmitting signal. In general, the fading envelope should be no larger than one. The input and the output of this block are both complex signals.')
set_param([sys,'/',['Rayleigh fading',13,'channel']],...
'Mask Entries','.5\/pi/50\/')
% Finished composite block ['Rayleigh fading',13,'channel'].
set_param([sys,'/',['Rayleigh fading',13,'channel']],...
'hide name',0,...
'position',[355,68,435,112])
% Subsystem ['MPSK demod',13,'baseband'].
new_system([sys,'/',['MPSK demod',13,'baseband']])
set_param([sys,'/',['MPSK demod',13,'baseband']],'Location',[4,554,405,737])
% Subsystem ['MPSK demod',13,'baseband/Min//max index2'].
new_system([sys,'/',['MPSK demod',13,'baseband/Min//max index2']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],'Location',[192,461,623,564])
add_block('built-in/Inport',[sys,'/',['MPSK demod',13,'baseband/Min//max index2/in_1']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2/in_1']],...
'position',[65,20,85,40])
add_block('built-in/Zero-Order Hold',[sys,'/',['MPSK demod',13,'baseband/Min//max index2/Zero-Order',13,'Hold']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2/Zero-Order',13,'Hold']],...
'Sample time','td',...
'position',[165,14,200,46])
add_block('built-in/Outport',[sys,'/',['MPSK demod',13,'baseband/Min//max index2/out_1']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2/out_1']],...
'position',[335,20,355,40])
add_block('built-in/S-Function',[sys,'/',['MPSK demod',13,'baseband/Min//max index2/Maximum']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2/Maximum']],...
'function name','arymimai',...
'parameters','mima',...
'position',[240,20,320,40])
add_line([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],[90,30;160,30])
add_line([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],[325,30;330,30])
add_line([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],[205,30;235,30])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
'Mask Display','Min/Max\ndemap',...
'Mask Type','Maximum/minimum index.')
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
'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,'/',['MPSK demod',13,'baseband/Min//max index2']],...
'Mask Translate','td=@1;mima=@2;')
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
'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,'/',['MPSK demod',13,'baseband/Min//max index2']],...
'Mask Entries','td\/''max''\/')
% Finished composite block ['MPSK demod',13,'baseband/Min//max index2'].
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
'ForeGround',4,...
'position',[180,53,260,97])
% Subsystem ['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband'].
new_system([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],'Location',[102,505,735,711])
add_block('built-in/Constant',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Shift key']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Shift key']],...
'Value','sft',...
'position',[40,63,60,87])
add_block('built-in/Sum',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Sum1']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Sum1']],...
'position',[165,75,190,115])
add_block('built-in/S-Function',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int1']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int1']],...
'function name','schdint',...
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -