⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tutmodce.m

📁 数字通信第四版原书的例程
💻 M
📖 第 1 页 / 共 5 页
字号:
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[50,215;75,215])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[340,95;350,95;350,115;375,115])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[340,155;350,155;350,125;375,125])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[165,90;300,90])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[243,90;243,260;300,260])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[160,205;275,205;275,100;300,100])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[275,205;275,305;300,305])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[165,110;250,110;250,150;300,150])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[255,150;255,315;300,315])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[340,265;350,265;350,285;375,285])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[340,310;350,310;350,295;375,295])


%     Finished composite block ['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply'].

set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],...
		'orientation',2,...
		'position',[50,70,125,110])

add_block('built-in/Filter',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Filter']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Filter']],...
		'Numerator','num',...
		'Denominator','den',...
		'Sample time','ts',...
		'position',[270,6,325,44])

add_block('built-in/Filter',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Filter2']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Filter2']],...
		'orientation',2,...
		'Numerator','num',...
		'Denominator','den',...
		'Sample time','ts',...
		'position',[310,80,370,120])

add_block('built-in/Product',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Product1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Product1']],...
		'orientation',2,...
		'position',[400,90,435,110])

add_block('built-in/Outport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/out_1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/out_1']],...
		'position',[495,15,515,35])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],[200,100;130,100])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],[305,100;290,100])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],[395,100;375,100])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],[320,175;455,175;455,105;440,105])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],[45,100;25,100;25,175;255,175])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],[45,80;30,80;30,25;265,25])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],[160,80;130,80])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],[330,25;490,25])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],[455,25;455,95;440,95])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],...
		'Mask Display','Costas PL\nDSB ADM',...
		'Mask Type','DSB-SC ADM')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],...
		'Mask Dialogue','Double-sideband suppressed-carrier amplitude demodulation:|Low-pass filter numerator:|Low-pass filter denominator:|Initial phase:|Sample time:')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],...
		'Mask Translate','num=@1;den=@2;Ph=@3;pi2=pi*2;ts=@4;')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],...
		'Mask Help','The DSB SC ADM demodulates a DSB-SC-AM signal using Costas Phase-Locked Loop method. The result of this ADM is phase sensitive. This block requires user to specify a lowpass filter which could filter the carrier freency and keep the message signal. Please refer Signal Processing Toolbox for design of the filters. ')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],...
		'Mask Entries','num\/den\/Ph\/ts\/')


%     Finished composite block ['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE'].

set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],...
		'ForeGround',2,...
		'position',[100,15,175,55])
add_line([sys,'/',['ADM with carrier',13,'baseband']],[265,40;285,40])
add_line([sys,'/',['ADM with carrier',13,'baseband']],[180,35;235,35])
add_line([sys,'/',['ADM with carrier',13,'baseband']],[65,35;95,35])
add_line([sys,'/',['ADM with carrier',13,'baseband']],[195,110;210,110;215,45;235,45])
set_param([sys,'/',['ADM with carrier',13,'baseband']],...
		'Mask Display','plot(0,0,100,100,x,y,u,v);ADM w TC',...
		'Mask Type','ADM with TC CE')
set_param([sys,'/',['ADM with carrier',13,'baseband']],...
		'Mask Dialogue','Demodulate the complex envelope of an\nAM with TC modulated signal.|Output signal offset:|Lowpass filter numerator:|Lowpass filter denominator:|Initial Phase (rad):|Sample time (ts):')
set_param([sys,'/',['ADM with carrier',13,'baseband']],...
		'Mask Translate','Offset=@1;num=@2;den=@3;Ph=@4;ts=@5;[x,y]=moduicon(2);[u,v]=cmplxicn(0,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['ADM with carrier',13,'baseband']],...
		'Mask Help','This block demodulates the complex envelope of an AM with transport carrier modulated signal. This block requires you to specify a lowpass filter, which eliminates the carrier frequency and keeps the message signal. This block takes a complex signal.')
set_param([sys,'/',['ADM with carrier',13,'baseband']],...
		'Mask Entries','1\/num\/den\/0\/ts\/')


%     Finished composite block ['ADM with carrier',13,'baseband'].

set_param([sys,'/',['ADM with carrier',13,'baseband']],...
		'ForeGround',3,...
		'hide name',0,...
		'position',[240,113,320,157])


%     Subsystem  ['FDM',13,'baseband'].

new_system([sys,'/',['FDM',13,'baseband']])
set_param([sys,'/',['FDM',13,'baseband']],'Location',[240,174,805,409])


%     Subsystem  ['FDM',13,'baseband/M//P 2 C'].

new_system([sys,'/',['FDM',13,'baseband/M//P 2 C']])
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C']],'Location',[103,336,548,644])

add_block('built-in/Mux',[sys,'/',['FDM',13,'baseband/M//P 2 C/Mux']])
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/Mux']],...
		'inputs','2',...
		'position',[225,111,270,149])

add_block('built-in/S-Function',[sys,'/',['FDM',13,'baseband/M//P 2 C/Array',13,'function1']])
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/Array',13,'function1']],...
		'function name','arysin',...
		'parameters','opr',...
		'Mask Display','Array\nFcn',...
		'Mask Type','Array function')
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/Array',13,'function1']],...
		'Mask Dialogue','Multi-input/multi-output functions, such as sin, cos, tan,exp,asin, acos,ln,log10,sgn.|Operation (string):',...
		'Mask Translate','opr=@1;')
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/Array',13,'function1']],...
		'Mask Help','The vector length of the output is the same as the input.',...
		'Mask Entries','''sin''\/',...
		'position',[85,149,140,181])

add_block('built-in/S-Function',[sys,'/',['FDM',13,'baseband/M//P 2 C/Array',13,'function']])
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/Array',13,'function']],...
		'function name','arysin',...
		'parameters','opr',...
		'Mask Display','Array\nFcn',...
		'Mask Type','Array function')
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/Array',13,'function']],...
		'Mask Dialogue','Multi-input/multi-output functions, such as sin, cos, tan,exp,asin, acos,ln,log10,sgn.|Operation (string):',...
		'Mask Translate','opr=@1;')
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/Array',13,'function']],...
		'Mask Help','The vector length of the output is the same as the input.',...
		'Mask Entries','''cos''\/',...
		'position',[85,74,145,106])

add_block('built-in/Inport',[sys,'/',['FDM',13,'baseband/M//P 2 C/in_2']])
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/in_2']],...
		'Port','2',...
		'position',[15,155,35,175])

add_block('built-in/Inport',[sys,'/',['FDM',13,'baseband/M//P 2 C/in_1']])
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/in_1']],...
		'position',[235,50,255,70])

add_block('built-in/Product',[sys,'/',['FDM',13,'baseband/M//P 2 C/Product']])
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/Product']],...
		'position',[320,107,345,138])

add_block('built-in/Outport',[sys,'/',['FDM',13,'baseband/M//P 2 C/out_1']])
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C/out_1']],...
		'position',[380,115,400,135])
add_line([sys,'/',['FDM',13,'baseband/M//P 2 C']],[150,90;170,90;170,120;220,120])
add_line([sys,'/',['FDM',13,'baseband/M//P 2 C']],[145,165;170,165;170,140;220,140])
add_line([sys,'/',['FDM',13,'baseband/M//P 2 C']],[40,165;80,165])
add_line([sys,'/',['FDM',13,'baseband/M//P 2 C']],[55,165;55,90;80,90])
add_line([sys,'/',['FDM',13,'baseband/M//P 2 C']],[275,130;315,130])
add_line([sys,'/',['FDM',13,'baseband/M//P 2 C']],[350,125;375,125])
add_line([sys,'/',['FDM',13,'baseband/M//P 2 C']],[260,60;280,60;280,115;315,115])
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C']],...
		'Mask Display','Mag/Phase\nto Cmplx',...
		'Mask Type','Mag/Phase to Complex number',...
		'Mask Dialogue','Convert Magnitude/Phase information to complex number.')
set_param([sys,'/',['FDM',13,'baseband/M//P 2 C']],...
		'Mask Help','This block conver Magnitude/Phase to complex number which is real/imag two part.')


%     Finished composite block ['FDM',13,'baseband/M//P 2 C'].

set_param([sys,'/',['FDM',13,'baseband/M//P 2 C']],...
		'orientation',2,...
		'position',[115,135,205,175])

add_block('built-in/Inport',[sys,'/',['FDM',13,'baseband/in_1']])
set_param([sys,'/',['FDM',13,'baseband/in_1']],...
		'position',[45,25,65,45])

add_block('built-in/Sum',[sys,'/',['FDM',13,'baseband/Sum']])
set_param([sys,'/',['FDM',13,'baseband/Sum']],...
		'orientation',2,...
		'position',[245,155,265,175])

add_block('built-in/Constant',[sys,'/',['FDM',13,'baseband/Constant']])
set_param([sys,'/',['FDM',13,'baseband/Constant']],...
		'orientation',2,...
		'position',[290,85,320,105])


%     Subsystem  ['FDM',13,'baseband/Multiply and',13,'take imag'].

new_system([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag']])
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag']],'Location',[317,81,820,296])

add_block('built-in/Outport',[sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/I_out_']])
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/I_out_']],...
		'position',[450,105,470,125])

add_block('built-in/Sum',[sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Sum1']])
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Sum1']],...
		'position',[390,105,410,125])

add_block('built-in/Product',[sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Product2']])
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Product2']],...
		'position',[220,108,250,132])

add_block('built-in/Product',[sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Product3']])
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Product3']],...
		'position',[310,63,340,87])

add_block('built-in/Inport',[sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Complex',13,'input 2']])
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Complex',13,'input 2']],...
		'Port','2',...
		'position',[30,150,50,170])

add_block('built-in/Demux',[sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Split1']])
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Split1']],...
		'outputs','2',...
		'Mask Display','Complex to\nReal/Imag',...
		'Mask Type','Complex to Real/Imag')
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Split1']],...
		'Mask Dialogue','Real and imaginary components of complex vector.')
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Split1']],...
		'Mask Help','The Complex to Real/Imag block decomposes a complex vector into its real and imaginary components using a Demux block. The real part is directed to output 1, and the imaginary to output 2.')
set_param([sys,'/',['FDM',13,'baseband/Multiply and',13,'take imag/Split1']],...
		'position',[85,139,160,181])

add_block('built-in/Inport',[sys,'/',['FDM',13,'ba

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -