📄 tstbterr.m
字号:
% Subsystem ['S-map QASK',13,'mod baseband/QASK',13,'square-map'].
new_system([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']])
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],'Location',[214,372,642,541])
add_block('built-in/Inport',[sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/in_1']])
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/in_1']],...
'position',[45,30,65,50])
add_block('built-in/Zero-Order Hold',[sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/Zero-Order',13,'Hold']])
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/Zero-Order',13,'Hold']],...
'Sample time','td',...
'position',[110,24,145,56])
add_block('built-in/Outport',[sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/out_1']])
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/out_1']],...
'position',[325,30,345,50])
add_block('built-in/Look Up Table',[sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/s-x axis']])
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/s-x axis']],...
'Input_Values','z',...
'Output_Values','x',...
'position',[245,25,280,55])
add_block('built-in/Outport',[sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/out_2']])
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/out_2']],...
'Port','2',...
'position',[325,95,345,115])
add_block('built-in/Look Up Table',[sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/c-y axis']])
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map/c-y axis']],...
'Input_Values','z',...
'Output_Values','y',...
'position',[245,90,280,120])
add_line([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],[285,40;320,40])
add_line([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],[285,105;320,105])
add_line([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],[150,40;240,40])
add_line([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],[185,40;185,105;240,105])
add_line([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],[70,40;105,40])
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],...
'Mask Display','QASK\nS-map',...
'Mask Type','QASK S-map')
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],...
'Mask Dialogue','Use square constellation to map the\ninput digital signal into in-phase and\nquadrature components. M must be\nM=2^K with integer K.|M-ary number (input integers in range [0, M-1]):|Input symbol interval and offset (sec):')
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],...
'Mask Translate','N=@1;Ac=1;td=@2;z=[[1:N];[1:N]];z=z(:);[x,y]=qaskenco(z-1,N);z=z-1.5;z=[z(2:2*N);N-.5];x=x/max(x);y=y/max(y);')
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],...
'Mask Help','This block maps a digital signal onto in-phase and quadratic components, which are outputs in the first and second output port respectively. The M-ary number must be M=2^K with integer K. The input symbol interval can be a two-element vector with the second element being offset. The default value offset is 0. The maximum amplitudes for the outputs are 1.')
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],...
'Mask Entries','M\/td\/')
% Finished composite block ['S-map QASK',13,'mod baseband/QASK',13,'square-map'].
set_param([sys,'/',['S-map QASK',13,'mod baseband/QASK',13,'square-map']],...
'hide name',0,...
'position',[50,53,130,97])
add_block('built-in/Outport',[sys,'/',['S-map QASK',13,'mod baseband/out_1']])
set_param([sys,'/',['S-map QASK',13,'mod baseband/out_1']],...
'position',[275,65,295,85])
add_block('built-in/Inport',[sys,'/',['S-map QASK',13,'mod baseband/in_1']])
set_param([sys,'/',['S-map QASK',13,'mod baseband/in_1']],...
'position',[5,65,20,85])
add_line([sys,'/',['S-map QASK',13,'mod baseband']],[135,65;160,65])
add_line([sys,'/',['S-map QASK',13,'mod baseband']],[135,85;160,85])
add_line([sys,'/',['S-map QASK',13,'mod baseband']],[250,75;270,75])
add_line([sys,'/',['S-map QASK',13,'mod baseband']],[25,75;45,75])
set_param([sys,'/',['S-map QASK',13,'mod baseband']],...
'Mask Display','plot(0,0,100,100,x,y,u,v);S-QASK',...
'Mask Type','Baseband S-QASK modulation')
set_param([sys,'/',['S-map QASK',13,'mod baseband']],...
'Mask Dialogue','Output the complex envelope of the QASK\nmodulated signal. This block uses a square\nconstellation with M-ary number M=2^K,\nK is an integer.|M-ary number (input digits in range [0, M-1]):|Symbol interval and offset (sec):|Initial phase (rad):|Sample time (sec):')
set_param([sys,'/',['S-map QASK',13,'mod baseband']],...
'Mask Translate','M=@1;td=@2;Ph=@3;ts=@4;[x,y]=moduicon(5);[u,v]=cmplxicn(1,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['S-map QASK',13,'mod baseband']],...
'Mask Help','This block outputs the complex envelope of a QASK modulated signal. This block uses square constellation. The inputs are integers in the range [0, M-1], where M is the M-ary number, M=2^K, and K is an integer. When the symbol interval is a two-element vector, the second element is the offset (default 0). ')
set_param([sys,'/',['S-map QASK',13,'mod baseband']],...
'Mask Entries','M\/td\/0\/ts\/')
% Finished composite block ['S-map QASK',13,'mod baseband'].
set_param([sys,'/',['S-map QASK',13,'mod baseband']],...
'hide name',0,...
'position',[110,38,190,82])
% 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',
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -