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

📄 ookwnymf.m

📁 现代通信系统(prokis)的所有matlab源程序,对初学者很有帮助的。
💻 M
📖 第 1 页 / 共 5 页
字号:
set_param([sys,'/','Product'],...
		'hide name',0,...
		'position',[395,113,425,137])


%     Subsystem  'Kanal'.

new_system([sys,'/','Kanal'])
set_param([sys,'/','Kanal'],'Location',[11,262,273,408])

add_block('built-in/Inport',[sys,'/','Kanal/in_1'])
set_param([sys,'/','Kanal/in_1'],...
		'position',[45,10,65,30])

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

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


%     Subsystem  ['Kanal/Gaussian noise',13,'generator'].

new_system([sys,'/',['Kanal/Gaussian noise',13,'generator']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],'Location',[22,119,370,243])

add_block('built-in/State-Space',[sys,'/',['Kanal/Gaussian noise',13,'generator/Matrix',13,'Gain']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Matrix',13,'Gain']],...
		'A','[]',...
		'B','[]',...
		'C','[]',...
		'D','K',...
		'Mask Display','K',...
		'Mask Type','Matrix Gain',...
		'Mask Dialogue','Matrix Gain.|Gain matrix:')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Matrix',13,'Gain']],...
		'Mask Translate','K = @1;',...
		'Mask Help','Multiplies input vector by entered matrix to produce output vector (y=Au).',...
		'Mask Entries','d\/')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Matrix',13,'Gain']],...
		'position',[140,61,165,89])

add_block('built-in/White Noise',[sys,'/',['Kanal/Gaussian noise',13,'generator/Random',13,'Number']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Random',13,'Number']],...
		'Seed','s',...
		'position',[35,57,80,93])

add_block('built-in/Constant',[sys,'/',['Kanal/Gaussian noise',13,'generator/Constant']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Constant']],...
		'Value','m',...
		'position',[140,20,160,40])

add_block('built-in/Sum',[sys,'/',['Kanal/Gaussian noise',13,'generator/Sum']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Sum']],...
		'position',[220,60,240,80])

add_block('built-in/Outport',[sys,'/',['Kanal/Gaussian noise',13,'generator/out_1']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/out_1']],...
		'position',[285,60,305,80])
add_line([sys,'/',['Kanal/Gaussian noise',13,'generator']],[165,30;190,30;190,65;215,65])
add_line([sys,'/',['Kanal/Gaussian noise',13,'generator']],[245,70;280,70])
add_line([sys,'/',['Kanal/Gaussian noise',13,'generator']],[170,75;215,75])
add_line([sys,'/',['Kanal/Gaussian noise',13,'generator']],[85,75;135,75])
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_line([sys,'/','Kanal'],[175,65;195,65])
add_line([sys,'/','Kanal'],[70,20;115,20;115,60;145,60])
add_line([sys,'/','Kanal'],[110,70;145,70])
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',[495,103,575,147])


%     Subsystem  ['Schwellenwert-',13,'Entscheider'].

new_system([sys,'/',['Schwellenwert-',13,'Entscheider']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider']],'Location',[159,417,467,586])

add_block('built-in/Outport',[sys,'/',['Schwellenwert-',13,'Entscheider/out_1']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider/out_1']],...
		'position',[215,65,235,85])

add_block('built-in/Relational Operator',[sys,'/',['Schwellenwert-',13,'Entscheider/Relational',13,'Operator']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider/Relational',13,'Operator']],...
		'Operator','>',...
		'position',[150,57,180,88])

add_block('built-in/Inport',[sys,'/',['Schwellenwert-',13,'Entscheider/in_1']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider/in_1']],...
		'position',[65,20,85,40])

add_block('built-in/Constant',[sys,'/',['Schwellenwert-',13,'Entscheider/Constant']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider/Constant']],...
		'Value','0.5',...
		'position',[60,107,90,133])
add_line([sys,'/',['Schwellenwert-',13,'Entscheider']],[185,75;210,75])
add_line([sys,'/',['Schwellenwert-',13,'Entscheider']],[95,120;110,120;110,80;145,80])
add_line([sys,'/',['Schwellenwert-',13,'Entscheider']],[90,30;115,30;115,65;145,65])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider']],...
		'Mask Display','plot(-50,-50,50,50,[-50,50],[0,0],[0,0],[-50,50],[-40,0],[-30,-30],[0,40],[30,30])',...
		'Mask Type','Sign',...
		'Mask Dialogue','y = sign(x)')
set_param([sys,'/',['Schwellenwert-',13,'Entscheider']],...
		'Mask Help','Sign Function:\n\t\t\ty = 1 if x > 0\n\t\t\ty = 0 if x = 0\n\t\t\ty = -1 if x < 0')


%     Finished composite block ['Schwellenwert-',13,'Entscheider'].

set_param([sys,'/',['Schwellenwert-',13,'Entscheider']],...
		'position',[900,107,930,133])

add_block('built-in/Product',[sys,'/','Product1'])
set_param([sys,'/','Product1'],...
		'hide name',0,...
		'position',[650,108,680,132])

add_block('built-in/Scope',[sys,'/','Senkensignal v(t)'])
set_param([sys,'/','Senkensignal v(t)'],...
		'Vgain','2.000000',...
		'Hgain','25.000000',...
		'Vmax','4.000000',...
		'Hmax','50.000000',...
		'Window',[344,922,1280,1022])
open_system([sys,'/','Senkensignal v(t)'])
set_param([sys,'/','Senkensignal v(t)'],...
		'position',[1000,105,1030,135])

add_block('built-in/Scope',[sys,'/','Sendesignal s(t)'])
set_param([sys,'/','Sendesignal s(t)'],...
		'orientation',1,...
		'Vgain','2.000000',...
		'Hgain','25.000000',...
		'Vmax','4.000000',...
		'Hmax','50.000000',...
		'Window',[344,533,1280,633])
open_system([sys,'/','Sendesignal s(t)'])
set_param([sys,'/','Sendesignal s(t)'],...
		'position',[425,185,455,215])


%     Subsystem  'Quelle'.

new_system([sys,'/','Quelle'])
set_param([sys,'/','Quelle'],'Location',[4,149,283,322])

add_block('built-in/Outport',[sys,'/','Quelle/out_1'])
set_param([sys,'/','Quelle/out_1'],...
		'position',[230,75,250,95])


%     Subsystem  'Quelle/Quelle'.

new_system([sys,'/','Quelle/Quelle'])
set_param([sys,'/','Quelle/Quelle'],'Location',[355,528,737,675])


%     Subsystem  ['Quelle/Quelle/Pulses deivide',13,'same sample time1'].

new_system([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1']])
set_param([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1']],'Location',[55,192,283,286])

add_block('built-in/S-Function',[sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1/S-function1']])
set_param([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1/S-function1']],...
		'function name','homopuls',...
		'parameters','samp_time, out_divid, offset',...
		'position',[40,31,105,59])

add_block('built-in/Outport',[sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1/Outport']])
set_param([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1/Outport']],...
		'position',[160,35,180,55])
add_line([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1']],[110,45;155,45])
set_param([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Display','Vector\nPulse',...
		'Mask Type','Pulse generator')
set_param([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Dialogue','Vector pulses with sample rate of each pulse as Sample_time ./Divider. |Sample time (scalar, sec):|Divider (integer vector):|Offset (have same dimension as Divider:')
set_param([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Translate','samp_time=@1;out_divid=@2;offset=@3;')
set_param([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Help','This block generator a vector pulses. The output length is the same as the vector defined in "Divider". The ith element of the output has the sample time Sample_time/Divider(i). All elements in "Divider" must be integers.')
set_param([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Entries','ts\/1\/off\/')


%     Finished composite block ['Quelle/Quelle/Pulses deivide',13,'same sample time1'].

set_param([sys,'/',['Quelle/Quelle/Pulses deivide',13,'same sample time1']],...
		'position',[50,56,110,94])

add_block('built-in/Outport',[sys,'/','Quelle/Quelle/out_1'])
set_param([sys,'/','Quelle/Quelle/out_1'],...
		'position',[295,65,315,85])

add_block('built-in/S-Function',[sys,'/','Quelle/Quelle/Message source'])
set_param([sys,'/','Quelle/Quelle/Message source'],...
		'BackGround',5,...
		'function name','trigwksp',...
		'parameters','var,thd,cyclFlag,ini',...
		'Mask Display','Triggered\nread',...
		'Mask Type','Read from workspace')
set_param([sys,'/','Quelle/Quelle/Message source'],...
		'Mask Dialogue','The raising edge of input pulse trigger the block output the next row from the workspace variable.|Read the variable:|Threshold for the input pulse:|Cyclic read variable (1) or amend zeros (0).|Output before first trigger:')
set_param([sys,'/','Quelle/Quelle/Message source'],...
		'Mask Translate','var=@1;thd=@2;cyclFlag=@3;ini=@4;',...
		'Mask Help','This block reads the data from a workspace variable. The output is refreshed at the raising edge of the input pulse.')
set_param([sys,'/','Quelle/Quelle/Message source'],...
		'Mask Entries','var\/.1\/cyc\/ini\/',...
		'position',[180,53,255,97])
add_line([sys,'/','Quelle/Quelle'],[260,75;290,75])
add_line([sys,'/','Quelle/Quelle'],[115,75;175,75])
set_param([sys,'/','Quelle/Quelle'],...
		'Mask Display','plot(0,0,100,100,x,y);Rd wksp',...
		'Mask Type','Read from workspace')
set_param([sys,'/','Quelle/Quelle'],...
		'Mask Dialogue','Read from a workspace variable at\nsampling time point.|Variable (column_number=block_output_length):|Data output sample time (sec):|Repeat flag (1: repeat read, 0: output zeros after eof).|Initial output:')
set_param([sys,'/','Quelle/Quelle'],...
		'Mask Translate','var=@1;td=@2;ts=td(1);if (length(td)>=2),off=td(2);else off=0;end;cyc=@3;ini=@4;[x,y]=srcsicon(7);')

⌨️ 快捷键说明

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