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

📄 qpsnrzmf.m

📁 很多通信系统的matlab程序,便于修改调用
💻 M
📖 第 1 页 / 共 5 页
字号:
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Display','plot(0,0,100,100,x,y);Gaussian',...
		'Mask Type','Gaussian noise generator')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Dialogue','Generate Gaussian distributed noise with\ngiven mean and variance value.|Mean value:|Variance (vector or matrix):|Initial seed:')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Translate','m=@1;d=@2;s=@3;[m,d,s]=gwnoise(m,d,s);[x,y]=srcsicon(3);')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Help','When the mean value and seed are vectors, the output of this block is a vector. The length of the vector is the same as the length of the mean value vector or the length of the seed. When the variance entry is a vector, the variance is a diagonal matrix.')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Entries','m\/d\/s\/')


%     Finished composite block ['Kanal/Gaussian noise',13,'generator'].

set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'position',[25,48,105,92])

add_block('built-in/Sum',[sys,'/','Kanal/Sum'])
set_param([sys,'/','Kanal/Sum'],...
		'position',[150,55,170,75])

add_block('built-in/Outport',[sys,'/','Kanal/out_1'])
set_param([sys,'/','Kanal/out_1'],...
		'position',[200,55,220,75])

add_block('built-in/Inport',[sys,'/','Kanal/in_1'])
set_param([sys,'/','Kanal/in_1'],...
		'position',[45,10,65,30])
add_line([sys,'/','Kanal'],[110,70;145,70])
add_line([sys,'/','Kanal'],[70,20;115,20;115,60;145,60])
add_line([sys,'/','Kanal'],[175,65;195,65])
set_param([sys,'/','Kanal'],...
		'Mask Display','plot(0,0,100,100,x,y);AWGN',...
		'Mask Type','AWGN channel, fixed parameter')
set_param([sys,'/','Kanal'],...
		'Mask Dialogue','Additive white Gaussian noise channel\nwith fixed mean and variance.|Mean value:|Variance (std^2):|Initial Seed:',...
		'Mask Translate','m=@1;d=@2;s=@3;[m,d,s]=gwnoise(m,d,s);[x,y]=chanicon;')
set_param([sys,'/','Kanal'],...
		'Mask Help','This block adds white Gaussian noise to the input signal. The mean and the variance can be a scalar or vector with the same length as the input signal.',...
		'Mask Entries','0\/.001\/12345\/')


%     Finished composite block 'Kanal'.

set_param([sys,'/','Kanal'],...
		'position',[465,83,545,127])


%     Subsystem  'Error rate'.

new_system([sys,'/','Error rate'])
set_param([sys,'/','Error rate'],'Location',[255,368,509,510])

add_block('built-in/S-Function',[sys,'/','Error rate/S-function'])
set_param([sys,'/','Error rate/S-function'],...
		'function name','sbiterr',...
		'parameters','num_lin, K, TDelay, Sample',...
		'position',[130,52,195,78])

add_block('built-in/Mux',[sys,'/','Error rate/Mux'])
set_param([sys,'/','Error rate/Mux'],...
		'inputs','2',...
		'position',[65,46,100,79])

add_block('built-in/Inport',[sys,'/','Error rate/in_1'])
set_param([sys,'/','Error rate/in_1'],...
		'position',[15,45,35,65])

add_block('built-in/Inport',[sys,'/','Error rate/in_2'])
set_param([sys,'/','Error rate/in_2'],...
		'Port','2',...
		'position',[15,60,35,80])
add_line([sys,'/','Error rate'],[105,65;125,65])
add_line([sys,'/','Error rate'],[40,55;60,55])
add_line([sys,'/','Error rate'],[40,70;60,70])
set_param([sys,'/','Error rate'],...
		'Mask Display','Error\nmeter',...
		'Mask Type','Symbol/bit error counter')
set_param([sys,'/','Error rate'],...
		'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 signal.|Bit per symbol:|Number of digits on display:|Delay between 1st port and 2nd port:|Sample time (sec):')
set_param([sys,'/','Error rate'],...
		'Mask Translate','K=@1;num_lin=@2;TDelay=@3;Sample=@4;')
set_param([sys,'/','Error rate'],...
		'Mask Help','The signal from the first port must be a scalar. The second input port can be a vector with a delay to the first port signal. The comparison happens only at the sampling point.')
set_param([sys,'/','Error rate'],...
		'Mask Entries','2\/10\/1\/1\/')


%     Finished composite block 'Error rate'.

set_param([sys,'/','Error rate'],...
		'orientation',1,...
		'position',[465,215,545,255])

add_block('built-in/Scope',[sys,'/',['empfangenes',13,'Symbol']])
set_param([sys,'/',['empfangenes',13,'Symbol']],...
		'orientation',1,...
		'move name',0,...
		'Vgain','3.000000',...
		'Hgain','25.000000',...
		'Vmax','6.000000',...
		'Hmax','50.000000',...
		'Window',[360,738,1280,838])
open_system([sys,'/',['empfangenes',13,'Symbol']])
set_param([sys,'/',['empfangenes',13,'Symbol']],...
		'position',[745,220,775,250])

add_block('built-in/Scope',[sys,'/','Bin鋜signal'])
set_param([sys,'/','Bin鋜signal'],...
		'orientation',3,...
		'move name',0,...
		'Vgain','3.000000',...
		'Hgain','25.000000',...
		'Vmax','6.000000',...
		'Hmax','50.000000',...
		'Window',[360,341,1280,441])
open_system([sys,'/','Bin鋜signal'])
set_param([sys,'/','Bin鋜signal'],...
		'position',[320,25,350,55])


%     Subsystem  'Sender'.

new_system([sys,'/','Sender'])
set_param([sys,'/','Sender'],'Location',[252,42,1260,321])

add_block('built-in/Scope',[sys,'/','Sender/x_I(t)'])
set_param([sys,'/','Sender/x_I(t)'],...
		'orientation',3,...
		'Vgain','1.500000',...
		'Hgain','25.000000',...
		'Vmax','3.000000',...
		'Hmax','50.000000',...
		'Window',[359,438,1280,538],...
		'position',[430,10,460,40])

add_block('built-in/Scope',[sys,'/','Sender/d_I(t)'])
set_param([sys,'/','Sender/d_I(t)'],...
		'orientation',3,...
		'Vgain','1.500000',...
		'Hgain','25.000000',...
		'Vmax','3.000000',...
		'Hmax','50.000000',...
		'Window',[359,340,1280,440],...
		'position',[220,10,250,40])

add_block('built-in/Fcn',[sys,'/','Sender/Fcn1'])
set_param([sys,'/','Sender/Fcn1'],...
		'hide name',0,...
		'Expr','cos(4*pi*u)',...
		'position',[615,130,710,160])

add_block('built-in/Product',[sys,'/','Sender/Product'])
set_param([sys,'/','Sender/Product'],...
		'hide name',0,...
		'position',[770,83,800,107])


%     Subsystem  ['Sender/Signalraum-',13,'zuordnung'].

new_system([sys,'/',['Sender/Signalraum-',13,'zuordnung']])
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung']],'Location',[58,103,403,268])

add_block('built-in/Zero-Order Hold',[sys,'/',['Sender/Signalraum-',13,'zuordnung/Zero-Order',13,'Hold1']])
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung/Zero-Order',13,'Hold1']],...
		'Sample time','td',...
		'position',[80,14,115,46])

add_block('built-in/Inport',[sys,'/',['Sender/Signalraum-',13,'zuordnung/in_1']])
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung/in_1']],...
		'position',[25,20,45,40])

add_block('built-in/Look Up Table',[sys,'/',['Sender/Signalraum-',13,'zuordnung/real part']])
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung/real part']],...
		'Input_Values','x',...
		'Output_Values','y1',...
		'position',[180,17,215,43])

add_block('built-in/Look Up Table',[sys,'/',['Sender/Signalraum-',13,'zuordnung/imag part1']])
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung/imag part1']],...
		'Input_Values','x',...
		'Output_Values','y2',...
		'position',[175,97,210,123])

add_block('built-in/Outport',[sys,'/',['Sender/Signalraum-',13,'zuordnung/Real']])
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung/Real']],...
		'position',[275,20,295,40])

add_block('built-in/Outport',[sys,'/',['Sender/Signalraum-',13,'zuordnung/Imag']])
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung/Imag']],...
		'Port','2',...
		'position',[275,100,295,120])
add_line([sys,'/',['Sender/Signalraum-',13,'zuordnung']],[50,30;75,30])
add_line([sys,'/',['Sender/Signalraum-',13,'zuordnung']],[120,30;175,30])
add_line([sys,'/',['Sender/Signalraum-',13,'zuordnung']],[145,30;145,110;170,110])
add_line([sys,'/',['Sender/Signalraum-',13,'zuordnung']],[220,30;270,30])
add_line([sys,'/',['Sender/Signalraum-',13,'zuordnung']],[215,110;270,110])
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung']],...
		'Mask Display','QASK\nC-map',...
		'Mask Type','QASK C-map')
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung']],...
		'Mask Dialogue','QASK mapping with circle constellation. The constellation is defined in NIC, RIC and PIC.|Number of symbols in each circle NIC:|Radii in each circle RIC:|Phase shift in each circle PIC (rad):|Symbol interval and offset (sec):')
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung']],...
		'Mask Translate','N=@1;A=@2;P=@3;td=@4;y1=apkconst(N,A,P);y1=[y1;y1];y1=y1(:);y2=imag(y1);y1=real(y1);x=[-sum(N) 1:sum(N)-1;1:sum(N)-1 10*sum(N)]-.5;x=x(:);')
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung']],...
		'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 circle constellation is defined in NIC, RIC, and PIC. The input symbol interval can be a two-element vector with the second element being offset. The default value offset is 0. Use the MODMAP function to see the constellation.')
set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung']],...
		'Mask Entries','[4]\/[sqrt(2)]\/[pi/4]\/1\/')


%     Finished composite block ['Sender/Signalraum-',13,'zuordnung'].

set_param([sys,'/',['Sender/Signalraum-',13,'zuordnung']],...
		'position',[110,113,190,157])

add_block('built-in/Product',[sys,'/','Sender/Product1'])
set_param([sys,'/','Sender/Product1'],...
		'hide name',0,...
		'position',[770,233,800,257])

add_block('built-in/Sum',[sys,'/','Sender/Sum'])
set_param([sys,'/','Sender/Sum'],...
		'hide name',0,...
		'inputs','+-',...
		'position',[880,155,900,175])

add_block('built-in/Clock',[sys,'/','Sender/Clock'])
set_param([sys,'/','Sender/Clock'],...
		'position',[555,155,575,175])

add_block('built-in/Fcn',[sys,'/','Sender/Fcn2'])
set_param([sys,'/','Sender/Fcn2'],...
		'hide name',0,...
		'Expr','sin(4*pi*u)',...
		'position',[615,175,710,205])

add_block('built-in/Scope',[sys,'/','Sender/d_Q(t)'])
set_param([sys,'/','Sender/d_Q(t)'],...
		'orientation',3,...
		'Vgain','1.500000',...
		'Hgain','25.000000',...
		'Vmax','3.000000',...
		'Hmax','50.000000',...
		'Window',[359,633,1280,733],...
		'position',[220,165,250,195])

add_block('built-in/Scope',[sys,'/','Sender/x_Q(t)'])
set_param([sys,'/','Sender/x_Q(t)'],...
		'orientation',3,...
		'Vgain','1.500000',...
		'Hgain','25.000000',...
		'Vmax','3.000000',...
		'Hmax','50.000000',...
		'Window',[359,731,1280,831],...
		'position',[425,165,455,195])

add_block('built-in/Scope',[sys,'/','Sender/s_Q(t)'])
set_param([sys,'/','Sender/s_Q(t)'],...
		'Vgain','1.500000',...
		'Hgain','25.000000',...

⌨️ 快捷键说明

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