📄 tstrsbnv.m
字号:
'Mask Translate','seed=@2;lambda=@1;')
set_param([sys,'/',['adding noise',13,'in the transmit/Poisson',13,'noise']],...
'Mask Help','The output of this block is poisson distributed integers. The output size is the same as the vector size for seed. Please use function disttool to see the distribution of the outputof this block.')
set_param([sys,'/',['adding noise',13,'in the transmit/Poisson',13,'noise']],...
'Mask Entries','.02\/12345\/')
% Finished composite block ['adding noise',13,'in the transmit/Poisson',13,'noise'].
set_param([sys,'/',['adding noise',13,'in the transmit/Poisson',13,'noise']],...
'position',[90,104,165,146])
add_block('built-in/Outport',[sys,'/',['adding noise',13,'in the transmit/Error source']])
set_param([sys,'/',['adding noise',13,'in the transmit/Error source']],...
'Port','2',...
'position',[445,115,465,135])
add_block('built-in/Outport',[sys,'/',['adding noise',13,'in the transmit/code_word+error']])
set_param([sys,'/',['adding noise',13,'in the transmit/code_word+error']],...
'position',[435,50,455,70])
add_block('built-in/Inport',[sys,'/',['adding noise',13,'in the transmit/code_word']])
set_param([sys,'/',['adding noise',13,'in the transmit/code_word']],...
'position',[140,45,160,65])
add_block('built-in/Sum',[sys,'/',['adding noise',13,'in the transmit/Sum']])
set_param([sys,'/',['adding noise',13,'in the transmit/Sum']],...
'position',[245,50,265,70])
add_block('built-in/S-Function',[sys,'/',['adding noise',13,'in the transmit/Modulus',13,'operation']])
set_param([sys,'/',['adding noise',13,'in the transmit/Modulus',13,'operation']],...
'function name','arymodu',...
'parameters','md',...
'Mask Display','Modulo',...
'Mask Type','Modulo')
set_param([sys,'/',['adding noise',13,'in the transmit/Modulus',13,'operation']],...
'Mask Dialogue','Modulus operation:|Modulus base:',...
'Mask Translate','md = @1;')
set_param([sys,'/',['adding noise',13,'in the transmit/Modulus',13,'operation']],...
'Mask Help','This block output modulus operation of the input signal with module base as specified in block entry. The length of the output vector is the same as the input vector.')
set_param([sys,'/',['adding noise',13,'in the transmit/Modulus',13,'operation']],...
'Mask Entries','2\/',...
'position',[300,41,360,79])
add_line([sys,'/',['adding noise',13,'in the transmit']],[170,125;215,125;215,65;240,65])
add_line([sys,'/',['adding noise',13,'in the transmit']],[215,125;440,125])
add_line([sys,'/',['adding noise',13,'in the transmit']],[365,60;430,60])
add_line([sys,'/',['adding noise',13,'in the transmit']],[165,55;240,55])
add_line([sys,'/',['adding noise',13,'in the transmit']],[270,60;295,60])
% Finished composite block ['adding noise',13,'in the transmit'].
set_param([sys,'/',['adding noise',13,'in the transmit']],...
'position',[255,66,315,104])
% 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 Rate\nMeter',...
'Mask Type','Symbol/Bit Error Counter.')
set_param([sys,'/','Error rate'],...
'Mask Dialogue','Compare 2nd port input to scalar 1st port input. Compute the error rate.|Bit per symbol:|Number of digit on display:|Delay between input (1st port) and output (2nd port):|Sampling time (second):')
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 should be always be a scalar. The 2nd port input signal can be a vector with a same time delay to the input signal.')
set_param([sys,'/','Error rate'],...
'Mask Entries','1\/K_rs_demo\/2\/1/K_rs_demo/M_rs_demo\/')
% Finished composite block 'Error rate'.
set_param([sys,'/','Error rate'],...
'hide name',0,...
'position',[580,33,655,77])
% Subsystem 'Counter'.
new_system([sys,'/','Counter'])
set_param([sys,'/','Counter'],'Location',[128,50,722,374])
% Subsystem ['Counter/Rising edge',13,'detector1'].
new_system([sys,'/',['Counter/Rising edge',13,'detector1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector1']],'Location',[303,485,692,659])
add_block('built-in/Outport',[sys,'/',['Counter/Rising edge',13,'detector1/out_1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector1/out_1']],...
'position',[340,25,360,45])
add_block('built-in/Relational Operator',[sys,'/',['Counter/Rising edge',13,'detector1/Relational',13,'Operator1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector1/Relational',13,'Operator1']],...
'position',[200,88,230,112])
add_block('built-in/Relational Operator',[sys,'/',['Counter/Rising edge',13,'detector1/Relational',13,'Operator2']])
set_param([sys,'/',['Counter/Rising edge',13,'detector1/Relational',13,'Operator2']],...
'Operator','>',...
'position',[265,23,295,47])
add_block('built-in/Constant',[sys,'/',['Counter/Rising edge',13,'detector1/one1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector1/one1']],...
'Value','thld',...
'position',[30,135,60,155])
add_block('built-in/Memory',[sys,'/',['Counter/Rising edge',13,'detector1/Memory1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector1/Memory1']],...
'position',[125,80,165,110])
add_block('built-in/Inport',[sys,'/',['Counter/Rising edge',13,'detector1/in_1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector1/in_1']],...
'position',[10,15,30,35])
add_block('built-in/Relational Operator',[sys,'/',['Counter/Rising edge',13,'detector1/Relational',13,'Operator']])
set_param([sys,'/',['Counter/Rising edge',13,'detector1/Relational',13,'Operator']],...
'position',[135,18,165,42])
add_line([sys,'/',['Counter/Rising edge',13,'detector1']],[35,25;130,25])
add_line([sys,'/',['Counter/Rising edge',13,'detector1']],[45,25;45,95;120,95])
add_line([sys,'/',['Counter/Rising edge',13,'detector1']],[170,95;195,95])
add_line([sys,'/',['Counter/Rising edge',13,'detector1']],[65,145;100,145;100,35;130,35])
add_line([sys,'/',['Counter/Rising edge',13,'detector1']],[100,145;180,145;180,105;195,105])
add_line([sys,'/',['Counter/Rising edge',13,'detector1']],[170,30;260,30])
add_line([sys,'/',['Counter/Rising edge',13,'detector1']],[235,100;240,100;240,40;260,40])
add_line([sys,'/',['Counter/Rising edge',13,'detector1']],[300,35;335,35])
set_param([sys,'/',['Counter/Rising edge',13,'detector1']],...
'Mask Display','Edge\ndetector',...
'Mask Type','Edge Detection',...
'Mask Dialogue','Rising edge detection:|Threshold:',...
'Mask Translate','thld=@1;')
set_param([sys,'/',['Counter/Rising edge',13,'detector1']],...
'Mask Help','When the input signal rising edge passed the given shreshold, this block outputs one, otherwise outputs zero.',...
'Mask Entries','thld\/')
% Finished composite block ['Counter/Rising edge',13,'detector1'].
set_param([sys,'/',['Counter/Rising edge',13,'detector1']],...
'ForeGround',4,...
'position',[375,53,435,87])
add_block('built-in/Inport',[sys,'/','Counter/in_3'])
set_param([sys,'/','Counter/in_3'],...
'Port','3',...
'position',[315,60,335,80])
add_block('built-in/Memory',[sys,'/','Counter/Memory3'])
set_param([sys,'/','Counter/Memory3'],...
'orientation',2,...
'ForeGround',3,...
'position',[400,205,440,235])
add_block('built-in/Switch',[sys,'/','Counter/Switch3'])
set_param([sys,'/','Counter/Switch3'],...
'ForeGround',3,...
'Threshold','eps',...
'position',[470,139,495,171])
add_block('built-in/Outport',[sys,'/','Counter/out_1'])
set_param([sys,'/','Counter/out_1'],...
'position',[550,145,570,165])
% Subsystem ['Counter/Rising edge',13,'detector'].
new_system([sys,'/',['Counter/Rising edge',13,'detector']])
set_param([sys,'/',['Counter/Rising edge',13,'detector']],'Location',[303,485,692,659])
add_block('built-in/Relational Operator',[sys,'/',['Counter/Rising edge',13,'detector/Relational',13,'Operator']])
set_param([sys,'/',['Counter/Rising edge',13,'detector/Relational',13,'Operator']],...
'position',[135,18,165,42])
add_block('built-in/Inport',[sys,'/',['Counter/Rising edge',13,'detector/in_1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector/in_1']],...
'position',[10,15,30,35])
add_block('built-in/Memory',[sys,'/',['Counter/Rising edge',13,'detector/Memory1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector/Memory1']],...
'position',[125,80,165,110])
add_block('built-in/Constant',[sys,'/',['Counter/Rising edge',13,'detector/one1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector/one1']],...
'Value','thld',...
'position',[30,135,60,155])
add_block('built-in/Relational Operator',[sys,'/',['Counter/Rising edge',13,'detector/Relational',13,'Operator2']])
set_param([sys,'/',['Counter/Rising edge',13,'detector/Relational',13,'Operator2']],...
'Operator','>',...
'position',[265,23,295,47])
add_block('built-in/Relational Operator',[sys,'/',['Counter/Rising edge',13,'detector/Relational',13,'Operator1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector/Relational',13,'Operator1']],...
'position',[200,88,230,112])
add_block('built-in/Outport',[sys,'/',['Counter/Rising edge',13,'detector/out_1']])
set_param([sys,'/',['Counter/Rising edge',13,'detector/out_1']],...
'position',[340,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -