📄 intsymb_f.sci
字号:
//INTSYMB_f Scicos Symbol Integrator block
//Classical interface function ver1.0 - scilab-3
//22 d閏embre 2004 Author : - IRCOM GROUP - A.Layec
function [x,y,typ]=INTSYMB_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 Symbol Integrator']
[ok,nu,nech,init,gain,herit,exprs]=getvalue(text,...
['Size of inputs';'Number of sample';'Init counter value';...
'Gain';'Accepted herited (0/1)?'],...
list('vec',1,'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,[],[])
else
model.dep_ut=[%f %f]
[model,graphics,ok]=check_io(model,graphics,nu,nu,1,[])
end
graphics.exprs=exprs
model.in=nu
model.out=nu
model.dstate=0
model.ipar=[nech;init]
model.rpar=1/gain
x.graphics=graphics;x.model=model
break;
end
end
case 'define' then
nu=64
herit=1
nech=8
init=0
gain=1
model=scicos_model()
model.sim=list('int_symb',4)
model.in=nu
model.out=nu
model.evtin=[]
model.evtout=[]
model.dstate=0
model.rpar=1/gain
model.ipar=[nech;init]
model.blocktype='d'
model.firing=[]
model.dep_ut=[%t %f]
gr_i=['thick=xget(''thickness'')'
'pat=xget(''pattern'')'
'fnt=xget(''font'')'
'xstring(orig(1)+0.15*sz(1),orig(2)+0.2*sz(2),""0 "",0,0)'
'xstring(orig(1)+0.75*sz(1),orig(2)+0.8*sz(2),""Ts "",0,0)'
'xpoly(orig(1)+[0.7;0.62;0.549;0.44;0.364;0.291]*sz(1),orig(2)+[0.947;0.947;0.884;0.321;0.255;0.255]*sz(2),''lines'')'
'xset(''thickness'',thick)'
'xset(''pattern'',pat)'
'xset(''font'',fnt(1),fnt(2))'
]
exprs=[string(nu),string(nech),string(init),string(gain),string(herit)]
x=standard_define([2 2],model,exprs,gr_i)
end
endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -