📄 com_momp.m
字号:
'Mask Display','Windowed\nInt')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Limited-length',13,'integrator1']],...
'Mask Type','Moving window integration.')
set_param([sys,'/',['Coh MFSK demod',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,'/',['Coh MFSK demod',13,'corr baseband/Limited-length',13,'integrator1']],...
'Mask Translate','vec=@1;T=@2;sample_time=@3;method=@4;')
set_param([sys,'/',['Coh MFSK demod',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,'/',['Coh MFSK demod',13,'corr baseband/Limited-length',13,'integrator1']],...
'Mask Entries','N\/td\/ts\/''backward''\/',...
'position',[510,128,585,172])
add_block('built-in/S-Function',[sys,'/',['Coh MFSK demod',13,'corr baseband/Limited-length',13,'integrator']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Limited-length',13,'integrator']],...
'function name','moveint',...
'parameters','vec,T,sample_time,method',...
'Mask Display','Windowed\nInt')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Type','Moving window integration.')
set_param([sys,'/',['Coh MFSK demod',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,'/',['Coh MFSK demod',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Translate','vec=@1;T=@2;sample_time=@3;method=@4;')
set_param([sys,'/',['Coh MFSK demod',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,'/',['Coh MFSK demod',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Entries','N\/td\/ts\/''backward''\/',...
'position',[505,18,580,62])
add_block('built-in/Sum',[sys,'/',['Coh MFSK demod',13,'corr baseband/Sum3']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Sum3']],...
'position',[640,105,660,125])
add_block('built-in/Outport',[sys,'/',['Coh MFSK demod',13,'corr baseband/out_1']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/out_1']],...
'position',[685,105,705,125])
add_block('built-in/Product',[sys,'/',['Coh MFSK demod',13,'corr baseband/Product3']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Product3']],...
'position',[455,131,480,164])
add_block('built-in/S-Function',[sys,'/',['Coh MFSK demod',13,'corr baseband/Array sin1']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Array sin1']],...
'ForeGround',4,...
'function name','arysin',...
'parameters','''sin''',...
'position',[330,145,380,165])
add_block('built-in/Product',[sys,'/',['Coh MFSK demod',13,'corr baseband/Product']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Product']],...
'position',[450,21,475,54])
add_block('built-in/Demux',[sys,'/',['Coh MFSK demod',13,'corr baseband/Demux']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Demux']],...
'ForeGround',2,...
'outputs','2',...
'position',[330,20,370,55])
add_block('built-in/Inport',[sys,'/',['Coh MFSK demod',13,'corr baseband/in_1']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/in_1']],...
'position',[260,30,280,50])
add_block('built-in/S-Function',[sys,'/',['Coh MFSK demod',13,'corr baseband/Scheduled',13,'reset-int']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Scheduled',13,'reset-int']],...
'function name','schdint',...
'parameters','td, ts, limit',...
'Mask Display','Schdld\nreset-int',...
'Mask Type','Scheduled reset integration.')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Scheduled',13,'reset-int']],...
'Mask Dialogue','Reset the state to be zero(s) at the scheduled reset point.|Scheduled reset time inteval and offset:|Sample time and offset:|Modulo bound:')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Scheduled',13,'reset-int']],...
'Mask Translate','td=@1;ts=@2;limit=@3;')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Scheduled',13,'reset-int']],...
'Mask Help','This block resets the state(s) to be zero(s) at the begining of reset time inteval. The reset inteval can be a two elements vector with the second element being offset.')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Scheduled',13,'reset-int']],...
'Mask Entries','td\/ts\/Inf\/',...
'position',[125,39,185,81])
add_block('built-in/Constant',[sys,'/',['Coh MFSK demod',13,'corr baseband/Initial phase']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Initial phase']],...
'Value','Ph',...
'position',[105,113,125,137])
add_block('built-in/S-Function',[sys,'/',['Coh MFSK demod',13,'corr baseband/Array sin']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Array sin']],...
'ForeGround',3,...
'function name','arysin',...
'parameters','''cos''',...
'position',[325,85,375,105])
add_block('built-in/Sum',[sys,'/',['Coh MFSK demod',13,'corr baseband/Sum1']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Sum1']],...
'position',[265,77,290,108])
add_block('built-in/Constant',[sys,'/',['Coh MFSK demod',13,'corr baseband/Shift key']])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband/Shift key']],...
'Value','sft',...
'position',[60,48,80,72])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[375,45;405,45;405,140;450,140])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[385,155;450,155])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[485,150;505,150])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[480,40;500,40])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[585,40;605,40;605,110;635,110])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[590,150;605,150;605,120;635,120])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[665,115;680,115])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[380,95;415,95;415,45;445,45])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[375,30;445,30])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[285,40;325,40])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[295,95;320,95])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[305,95;305,155;325,155])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[85,60;120,60])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[190,60;225,60;225,85;260,85])
add_line([sys,'/',['Coh MFSK demod',13,'corr baseband']],[130,125;230,125;230,100;260,100])
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband']],...
'Mask Display','plot(0,0,100,100,u,v); Co MFSK',...
'Mask Type','Baseband coherent MFSK correlation')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband']],...
'Mask Dialogue','Compute baseband MFSK correlation. Take\nMFSK CE modulated signal. Output a vector\nof correlation result.|M-ary number (input in range [0, M-1]):|Tone space (Hz):|Symbol interval and offset (sec):|Initial phase (rad):|Sample time (sec):')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband']],...
'Mask Translate','pi2=2*pi;N=@1;Ph=@4;Ton=@2;sft=[0:N-1]*Ton*pi2;td=@3;ts=@5;[u,v]=cmplxicn(0,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband']],...
'Mask Help','This block calculates the coherent correlation value of the input signal with a vector of sinusoidal signals. These sinusoidal signals have their frequency the same as that of FM modulated signal of possible resulting digits. The output is an M length vector. M is the M-ary number. The MFSK demodulation result is the index of the largest output. The computation is phase sensitive. The input of this block is complex signal.')
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband']],...
'Mask Entries','8\/8/.2/5\/.2\/0\/.01\/')
% Finished composite block ['Coh MFSK demod',13,'corr baseband'].
set_param([sys,'/',['Coh MFSK demod',13,'corr baseband']],...
'position',[285,343,365,387])
% Subsystem ['Non-coh MFSK dm',13,'corr baseband'].
new_system([sys,'/',['Non-coh MFSK dm',13,'corr baseband']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband']],'Location',[69,218,990,452])
add_block('built-in/S-Function',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator1']])
set_param([sys,'/',['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,'/',['Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator1']],...
'Mask Type','Moving window integration.')
set_param([sys,'/',['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,'/',['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,'/',['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,'/',['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,'/',['Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']])
set_param([sys,'/',['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,'/',['Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Type','Moving window integration.')
set_param([sys,'/',['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,'/',['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,'/',['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,'/',['Non-coh MFSK dm',13,'corr baseband/Limited-length',13,'integrator']],...
'Mask Entries','N*2\/td\/ts\/''backward''\/',...
'position',[530,28,605,72])
add_block('built-in/Demux',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Demux']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Demux']],...
'outputs','2',...
'position',[685,35,725,70])
add_block('built-in/Demux',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Demux2']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Demux2']],...
'outputs','2',...
'position',[695,140,735,175])
add_block('built-in/Outport',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/out_1']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/out_1']],...
'position',[830,100,850,120])
add_block('built-in/Product',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Product']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Product']],...
'position',[490,31,515,64])
add_block('built-in/Product',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Product1']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Product1']],...
'position',[645,36,670,69])
add_block('built-in/Demux',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Demux1']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Demux1']],...
'ForeGround',2,...
'outputs','2',...
'position',[395,30,435,65])
add_block('built-in/Inport',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/in_1']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/in_1']],...
'position',[345,40,365,60])
add_block('built-in/Product',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Product3']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Product3']],...
'position',[480,136,505,169])
add_block('built-in/Product',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Product2']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Product2']],...
'position',[645,141,670,174])
add_block('built-in/Sum',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Sum4']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Sum4']],...
'inputs','++++',...
'position',[785,87,805,133])
add_block('built-in/S-Function',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Array sin1']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Array sin1']],...
'ForeGround',4,...
'function name','arysin',...
'parameters','''sin''',...
'position',[395,150,445,170])
add_block('built-in/S-Function',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Array sin']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Array sin']],...
'ForeGround',3,...
'function name','arysin',...
'parameters','''cos''',...
'position',[390,90,440,110])
add_block('built-in/Mux',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Mux']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Mux']],...
'inputs','2',...
'position',[325,78,355,122])
add_block('built-in/Constant',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Initial phase']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Initial phase']],...
'Value','Ph',...
'position',[85,118,105,142])
add_block('built-in/Sum',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Sum3']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Sum3']],...
'position',[285,108,305,137])
add_block('built-in/Sum',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Sum1']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Sum1']],...
'position',[210,72,235,103])
add_block('built-in/S-Function',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Scheduled',13,'reset-int']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Scheduled',13,'reset-int']],...
'function name','schdint',...
'parameters','td, ts, limit',...
'Mask Display','Schdld\nreset-int',...
'Mask Type','Scheduled reset integration.')
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Scheduled',13,'reset-int']],...
'Mask Dialogue','Reset the state to be zero(s) at the scheduled reset point.|Scheduled reset time inteval and offset:|Sample time and offset:|Modulo bound:')
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Scheduled',13,'reset-int']],...
'Mask Translate','td=@1;ts=@2;limit=@3;')
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Scheduled',13,'reset-int']],...
'Mask Help','This block resets the state(s) to be zero(s) at the begining of reset time inteval. The reset inteval can be a two elements vector with the second element being offset.')
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Scheduled',13,'reset-int']],...
'Mask Entries','td\/ts\/Inf\/',...
'position',[105,34,165,76])
add_block('built-in/Constant',[sys,'/',['Non-coh MFSK dm',13,'corr baseband/Shift key']])
set_param([sys,'/',['Non-coh MFSK dm',13,'corr baseband/Shift key']],...
'Value','sft',...
'position',[40,43,60,67])
add_line([sys,'/',['Non-coh MFSK dm',13,'corr baseband']],[445,100;460,100;460,55;485,55])
add_line([sys,'/',['Non-coh MFSK dm',13,'corr baseband']],[440,40;485,40])
add_line([sys,'/',['Non-coh MFSK dm',13,'corr baseband']],[440,55;450,55;450,145;475,145])
add_line([sys,'/',['Non-coh MFSK dm',13,'corr baseband']]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -