📄 tcemmfsk.m
字号:
'Sample time','td',...
'position',[165,14,200,46])
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/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_line([sys,'/',['Coh MFSK',13,'demod baseband/Min//max index']],[90,30;160,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']],[205,30;235,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])
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])
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_line([sys,'/',['Coh MFSK',13,'demod baseband']],[175,50;210,50])
add_line([sys,'/',['Coh MFSK',13,'demod baseband']],[55,50;85,50])
add_line([sys,'/',['Coh MFSK',13,'demod baseband']],[300,50;355,50])
set_param([sys,'/',['Coh MFSK',13,'demod baseband']],...
'Mask Display','plot(0,0,100,100,x,y,u,v); Co-MFSK',...
'Mask Type','Baseband coherent MFSK demodulation')
set_param([sys,'/',['Coh MFSK',13,'demod baseband']],...
'Mask Dialogue','Demodulate the complex envelope of a\nMFSK modulated signal using coherent\ncorrelation method.|M-ary number (output digits in range [0, M-1]):|Tone space (Hz):|Symbol interval (sec):|Initial phase (rad):|Sample time (sec):')
set_param([sys,'/',['Coh MFSK',13,'demod baseband']],...
'Mask Translate','M=@1;Ph=@4;Ton=@2;td=@3;ts=@5;[x,y]=moduicon(8);[u,v]=cmplxicn(0,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['Coh MFSK',13,'demod baseband']],...
'Mask Help','This block demodulates the complex envelope of a MFSK modulated signal using coherent method. The coherent demodulation method is phase sensitive. The tone space is the frequency distance between two successive after the modulation. 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).')
set_param([sys,'/',['Coh MFSK',13,'demod baseband']],...
'Mask Entries','M\/M/td/5\/td\/0\/ts\/')
% Finished composite block ['Coh MFSK',13,'demod baseband'].
set_param([sys,'/',['Coh MFSK',13,'demod baseband']],...
'hide name',0,...
'position',[410,38,490,82])
% Subsystem 'Error rate1'.
new_system([sys,'/','Error rate1'])
set_param([sys,'/','Error rate1'],'Location',[255,368,509,510])
add_block('built-in/S-Function',[sys,'/','Error rate1/S-function'])
set_param([sys,'/','Error rate1/S-function'],...
'function name','sbiterr',...
'parameters','num_lin, K, TDelay, Sample',...
'position',[130,52,195,78])
add_block('built-in/Mux',[sys,'/','Error rate1/Mux'])
set_param([sys,'/','Error rate1/Mux'],...
'inputs','2',...
'position',[65,46,100,79])
add_block('built-in/Inport',[sys,'/','Error rate1/in_1'])
set_param([sys,'/','Error rate1/in_1'],...
'position',[15,45,35,65])
add_block('built-in/Inport',[sys,'/','Error rate1/in_2'])
set_param([sys,'/','Error rate1/in_2'],...
'Port','2',...
'position',[15,60,35,80])
add_line([sys,'/','Error rate1'],[105,65;125,65])
add_line([sys,'/','Error rate1'],[40,55;60,55])
add_line([sys,'/','Error rate1'],[40,70;60,70])
set_param([sys,'/','Error rate1'],...
'Mask Display','Error\nmeter',...
'Mask Type','Symbol/bit error counter')
set_param([sys,'/','Error rate1'],...
'Mask Dialogue','Use the input data from the 1st port as the reference signal to detect the number of errors and error rate of the 2nd port inputted signal.|Bit per symbol:|Number of digits on display:|Delay between input (1st port) and output (2nd port):|Sampling time (sec):')
set_param([sys,'/','Error rate1'],...
'Mask Translate','K=@1;num_lin=@2;TDelay=@3;Sample=@4;')
set_param([sys,'/','Error rate1'],...
'Mask Help','The signal from the first port must be a scalar. The second input port can be a vector with a same-time delay to the input signal. The comparison happens only at the sampling point.')
set_param([sys,'/','Error rate1'],...
'Mask Entries','ceil(log10(M)/log10(2))\/20\/td\/td\/')
% Finished composite block 'Error rate1'.
set_param([sys,'/','Error rate1'],...
'hide name',0,...
'position',[630,63,710,107])
% Subsystem ['Noncoh MFSK',13,'demod baseband'].
new_system([sys,'/',['Noncoh MFSK',13,'demod baseband']])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband']],'Location',[47,515,504,698])
% Subsystem ['Noncoh MFSK',13,'demod baseband/Min//max index1'].
new_system([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],'Location',[192,461,623,564])
add_block('built-in/S-Function',[sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1/Maximum']])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1/Maximum']],...
'function name','arymimai',...
'parameters','mima',...
'position',[240,20,320,40])
add_block('built-in/Outport',[sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1/out_1']])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1/out_1']],...
'position',[335,20,355,40])
add_block('built-in/Zero-Order Hold',[sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1/Zero-Order',13,'Hold']])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1/Zero-Order',13,'Hold']],...
'Sample time','td',...
'position',[165,14,200,46])
add_block('built-in/Inport',[sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1/in_1']])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1/in_1']],...
'position',[65,20,85,40])
add_line([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],[205,30;235,30])
add_line([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],[325,30;330,30])
add_line([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],[90,30;160,30])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],...
'Mask Display','Min/Max\ndemap',...
'Mask Type','Maximum/minimum index.')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],...
'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,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],...
'Mask Translate','td=@1;mima=@2;')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],...
'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,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],...
'Mask Entries','td\/''max''\/')
% Finished composite block ['Noncoh MFSK',13,'demod baseband/Min//max index1'].
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Min//max index1']],...
'ForeGround',4,...
'position',[250,68,330,112])
% Subsystem ['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband'].
new_system([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband']])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband']],'Location',[69,218,990,452])
add_block('built-in/S-Function',[sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator1']])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator1']],...
'function name','moveint',...
'parameters','vec,T,sample_time,method',...
'Mask Display','Windowed\nInt')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator1']],...
'Mask Type','Moving window integration.')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator1']],...
'Mask Dialogue','Output the integration of the input from time t-T to t, where T is the integration window.|Input vector size:|Integration window length:|Sample time:|Method (''forward'', ''backward'', or ''first order''):')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator1']],...
'Mask Translate','vec=@1;T=@2;sample_time=@3;method=@4;')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator1']],...
'Mask Help','This block output\n t\nint u(t) dt\n t-T\nThe output vector length is the same as the input vector length.')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator1']],...
'Mask Entries','N*2\/td\/ts\/''backward''\/',...
'position',[525,133,600,177])
add_block('built-in/S-Function',[sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']])
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']],...
'function name','moveint',...
'parameters','vec,T,sample_time,method',...
'Mask Display','Windowed\nInt')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Type','Moving window integration.')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Dialogue','Output the integration of the input from time t-T to t, where T is the integration window.|Input vector size:|Integration window length:|Sample time:|Method (''forward'', ''backward'', or ''first order''):')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Translate','vec=@1;T=@2;sample_time=@3;method=@4;')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Help','This block output\n t\nint u(t) dt\n t-T\nThe output vector length is the same as the input vector length.')
set_param([sys,'/',['Noncoh MFSK',13,'demod baseband/Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Entries','N*2\/td\/ts\/''backward''\/',...
'position',[530,28,605,72])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -