📄 tstbterr.m
字号:
new_system([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],'Location',[436,148,718,302])
add_block('built-in/Inport',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/y0']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/y0']],...
'Port','2',...
'position',[20,80,40,100])
add_block('built-in/Outport',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/table out']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/table out']],...
'position',[215,55,235,75])
add_block('built-in/Inport',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/x0']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/x0']],...
'position',[20,25,40,45])
add_block('built-in/S-Function',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/S-function']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/S-function']],...
'function name','sftable2',...
'parameters','xindex, yindex, table',...
'position',[140,52,190,78])
add_block('built-in/Mux',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/Mux']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table/Mux']],...
'inputs','2',...
'position',[90,46,120,79])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],[45,90;65,90;65,70;85,70])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],[195,65;210,65])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],[45,35;65,35;65,55;85,55])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],[125,65;135,65])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],...
'Mask Display','plot(-10,-10,110,110,[90,50,10],[90,40,30],[90,50,10],[50,26,20],[90,50,10],[22,13,10])',...
'Mask Type','2-D Table Lookup')
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],...
'Mask Dialogue','Two Dimensional Table Lookup\nThe first input corresponds to X Index and the second input corresponds to the Y Index|X Index|Y Index|Table')
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],...
'Mask Translate','xindex=@1; yindex=@2; table=@3; sftab2chk(xindex,yindex,table);')
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],...
'Mask Help','This block returns a linearly interpolated intersection from the table using the X index (which corresponds to the rows of the table) and the Y index (which corresponds to the columns of the table). Extrapolation is used.')
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],...
'Mask Entries','x\/y\/tab\/')
% Finished composite block ['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table'].
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/2-D Table']],...
'position',[515,68,545,92])
add_block('built-in/Sum',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Sum3']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Sum3']],...
'ForeGround',2,...
'inputs','+-',...
'position',[580,73,600,102])
add_block('built-in/Saturation',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Saturation']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Saturation']],...
'Lower Limit','0',...
'Upper Limit','N-1',...
'position',[630,78,660,102])
add_block('built-in/Outport',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/out_1']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/out_1']],...
'position',[685,80,705,100])
add_block('built-in/Sum',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Sum4']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Sum4']],...
'ForeGround',2,...
'position',[470,58,490,87])
add_block('built-in/Sum',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Sum1']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Sum1']],...
'ForeGround',2,...
'inputs','+-',...
'position',[280,33,300,62])
add_block('built-in/Sum',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Sum2']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Sum2']],...
'ForeGround',2,...
'inputs','+-',...
'position',[290,158,310,187])
add_block('built-in/S-Function',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Minimum']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Minimum']],...
'function name','arymimai',...
'parameters','''min''',...
'position',[385,165,450,185])
add_block('built-in/Constant',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Shift key']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Shift key']],...
'Value','sfty',...
'position',[225,214,250,236])
add_block('built-in/S-Function',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Minimum1']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Minimum1']],...
'function name','arymimai',...
'parameters','''min''',...
'position',[385,40,445,60])
add_block('built-in/Constant',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Shift key1']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Shift key1']],...
'Value','sftx',...
'position',[220,89,245,111])
add_block('built-in/Constant',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Shift key2']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Shift key2']],...
'BackGround',5,...
'position',[325,114,350,136])
add_block('built-in/Abs',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Abs1']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Abs1']],...
'position',[325,38,355,62])
add_block('built-in/Abs',[sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Abs']])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap/Abs']],...
'position',[325,163,355,187])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[85,40;130,40])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[360,175;380,175])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[315,175;320,175])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[255,225;260,225;260,180;285,180])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[250,100;255,100;255,55;275,55])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[305,50;320,50])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[360,50;380,50])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[665,90;680,90])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[550,80;575,80])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[605,90;625,90])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[450,50;450,65;465,65])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[455,175;465,175])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[495,170;500,170;510,85])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[355,125;560,125;560,95;575,95])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[450,125;450,160;465,160])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[450,125;450,80;465,80])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[495,75;510,75])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[85,165;130,165])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[175,165;285,165])
add_line([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],[175,40;275,40])
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],...
'Mask Display','QASK\nS-demap',...
'Mask Type','QASK S-demap')
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],...
'Mask Dialogue','Reverse the QASK map. Input in-phase\nand quadrature components from the\ntwo inputs. Output demapped signal.|QASK M-ary number (outputs are in range [0, M-1]):|Output symbol interval and offset (sec):')
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],...
'Mask Translate','N=@1;td=@2;Ac=1;sftx=[1 -1 3 -3 5 -5 7 -7 9 -9 11 -11 13 -13 15 -15];sftx=sftx(1:2*ceil(sqrt(N)/2));sfty=sftx;if N==8,sfty=sfty(1:2);end;sftx=sftx/max(sftx)*Ac;sfty=sfty/max(sfty)*Ac;tab=qaskdeco(length(sftx),length(sfty),''fetch'')+1;x=[1:length(sftx)];y=[1:length(sfty)];')
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],...
'Mask Help','This block demaps a QASK mapped signal using square constellation. You can place this block after a QAM demodulation block. This block assumes the maximum amplitude of the input signals is 1. The output symbols are integers in the range [0, M-1]. The input symbol interval can be a two-element vector with the second element being offset. The default value offset is 0.')
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],...
'Mask Entries','M\/td\/')
% Finished composite block ['S-map QASK',13,'demod baseband1/QASK',13,'square-demap'].
set_param([sys,'/',['S-map QASK',13,'demod baseband1/QASK',13,'square-demap']],...
'hide name',0,...
'position',[205,28,285,72])
add_line([sys,'/',['S-map QASK',13,'demod baseband1']],[65,50;85,50])
add_line([sys,'/',['S-map QASK',13,'demod baseband1']],[290,50;315,50])
add_line([sys,'/',['S-map QASK',13,'demod baseband1']],[175,60;200,60])
add_line([sys,'/',['S-map QASK',13,'demod baseband1']],[175,40;200,40])
set_param([sys,'/',['S-map QASK',13,'demod baseband1']],...
'Mask Display','plot(0,0,100,100,x,y,u,v);S-QASK',...
'Mask Type','Baseband S-QASK demodulation')
set_param([sys,'/',['S-map QASK',13,'demod baseband1']],...
'Mask Dialogue','Demodulate the complex envelope of a QASK modulated signal. This block uses a fixed square constellation with M-ary number M=2^K, where K is an integer.|M-ary number (integer in range [0 M-1]):|Symbol interval and offset (sec):|Lowpass filter numerator:|Lowpass filter denominator:|Initial phase (rad):|Sample time (sec):')
set_param([sys,'/',['S-map QASK',13,'demod baseband1']],...
'Mask Translate','M=@1;td=@2;num=@3;den=@4;Ph=@5;ts=@6;[x,y]=moduicon(6);[u,v]=cmplxicn(0,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['S-map QASK',13,'demod baseband1']],...
'Mask Help','This block demodulates a QASK modulated signal using square constellation. The output signals are digits in the range [0, M-1], where M is the M-ary number, M=2^K, 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,'demod baseband1']],...
'Mask Entries','M\/td\/num\/den\/0\/ts\/')
% Finished composite block ['S-map QASK',13,'demod baseband1'].
set_param([sys,'/',['S-map QASK',13,'demod baseband1']],...
'hide name',0,...
'position',[325,108,405,152])
% Subsystem ['S-map QASK',13,'demod baseband'].
new_system([sys,'/',['S-map QASK',13,'demod baseband']])
set_param([sys,'/',['S-map QASK',13,'demod baseband']],'Location',[33,553,383,660])
% Subsystem ['S-map QASK',13,'demod baseband/QASK',13,'square-demap'].
new_system([sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap']])
set_param([sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap']],'Location',[57,374,831,674])
add_block('built-in/Abs',[sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Abs']])
set_param([sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Abs']],...
'position',[325,163,355,187])
add_block('built-in/Abs',[sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Abs1']])
set_param([sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Abs1']],...
'position',[325,38,355,62])
add_block('built-in/Constant',[sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Shift key2']])
set_param([sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Shift key2']],...
'BackGround',5,...
'position',[325,114,350,136])
add_block('built-in/Constant',[sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Shift key1']])
set_param([sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Shift key1']],...
'Value','sftx',...
'position',[220,89,245,111])
add_block('built-in/S-Function',[sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Minimum1']])
set_param([sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Minimum1']],...
'function name','arymimai',...
'parameters','''min''',...
'position',[385,40,445,60])
add_block('built-in/Constant',[sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Shift key']])
set_param([sys,'/',['S-map QASK',13,'demod baseband/QASK',13,'square-demap/Shift key']],...
'Value','sfty',...
'position',[225,214,250,236])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -