📄 biterror_f.sci
字号:
//BITERROR_f Scicos Bit error Rate calculation block
//Classical interface function ver1.0 - scilab-3.0
//16 novembre 2004 Author : - IRCOM GROUP - A.Layec
function [x,y,typ]=BITERROR_f(job,arg1,arg2)
x=[];y=[];typ=[]
select job
case 'plot' then
standard_draw(arg1)
case 'getinputs' then
[x,y,typ]=standard_inputs(arg1)
case 'getoutputs' then
[x,y,typ]=standard_outputs(arg1)
case 'getorigin' then
[x,y]=standard_origin(arg1)
case 'set' then
x=arg1;
graphics=arg1.graphics;model=arg1.model;
exprs=graphics.exprs;
while %t do
text=['Set Scicos Bit Error Estimation Block']
[ok,nu,nbit,nb_event,herit,exprs]=getvalue(text,...
['Size of inputs';'Number of bit';...
'Number of event before estimation';'Accept herited events 0/1'],...
list('vec',1,'vec',1,'vec',1,'vec',1),exprs)
if ~ok then break,end;
if ok then
if herit==1 then
model.dep_ut=[%t %f]
[model,graphics,ok]=check_io(model,graphics,[nu;nu],1,[],[])
else
model.dep_ut=[%f %f]
[model,graphics,ok]=check_io(model,graphics,[nu;nu],1,1,[])
end
graphics.exprs=exprs
model.in=[nu;nu]
model.out=1
model.dstate=[0;0]
model.ipar=[nbit;nb_event]
model.rpar=[]
x.graphics=graphics;x.model=model
break;
end
end
case 'define' then
nu=64;
nbit=4;
nb_event=0;
herit=1;
model=scicos_model()
model.sim=list('teb2',4)
model.in=[nu;nu]
model.out=1
model.evtin=[]
model.evtout=[]
model.dstate=[0;0]
model.rpar=[]
model.ipar=[nbit;nb_event]
model.blocktype='d'
model.firing=[]
model.dep_ut=[%t %f]
gr_i=['txt=[''Bit Error'';''Counter''];';
'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');'
]
exprs=[string(nu),string(nbit),string(nb_event),string(herit)]
x=standard_define([2 2],model,exprs,gr_i)
end
endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -