📄 codinservec_f.sci
字号:
//CODINSERVEC_f Scicos Code by Symbole multipliction block
//Classical interface function ver1.0 - scilab-2.7
//16 d閏embre 2004 - IRCOM GROUP - Author : A.Layec
function [x,y,typ]=CODINSERVEC_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
[ok,nc,nus,pc,exprs]=getvalue('Set sequence/symbol modulation block',...
['Size of sequence';'Size of symbol';'Port of sequence (1 or 2)'],...
list('vec',-1,'vec',-1,'vec',-1),exprs);
if ~ok then break,end;
//nu=size(wo,'*')
if (pc==1) then
[model,graphics,ok]=check_io(model,graphics,[nc;nus],[nc*nus],[],[])
else
[model,graphics,ok]=check_io(model,graphics,[nus;nc],[nc*nus],[],[])
end
if ok then
graphics.exprs=exprs;
model.ipar=pc-1;
x.graphics=graphics; x.model=model;
break;
end
end
case 'define' then
pc=1
nc=31
nus=10
herit=1
model=scicos_model()
model.sim=list('codinservec',4)
model.in=[nc;nus]
model.out=[nc*nus]
model.evtin=[]
model.evtout=[]
model.dstate=[]
model.rpar=[]
model.ipar=[pc-1]
model.blocktype='d'
model.firing=[]
model.dep_ut=[%t %f]
// gr_i=['txt=[''Codinservec''];';
// 'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');']
gr_i=['thick=xget(''thickness'')'
'pat=xget(''pattern'')'
'fnt=xget(''font'')'
'xset(''thickness'',3)'
'xpoly(orig(1)+[0.232;0.786]*sz(1),orig(2)+[0.901;0.109]*sz(2),""lines"")'
'xpoly(orig(1)+[0.243;0.762]*sz(1),orig(2)+[0.119;0.925]*sz(2),""lines"")'
'xset(''thickness'',thick)'
'xset(''pattern'',pat)'
]
exprs=[sci2exp(nc),sci2exp(nus),sci2exp(pc)];
x=standard_define([2 2],model,exprs,gr_i)
x.graphics.id=["coder"]
end
endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -