?? vcoevt_f.sci
字號:
//VCOEVT_f Scicos Time transition calculator block
//Classical interface function ver1.0 - scilab-3
//8 avril 2004 - IRCOM GROUP - Author : A.Layec
function [x,y,typ]=VCOEVT_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,step,transition,init_trans,init_date,dyn_input,exprs]=getvalue('Scicos Time transition calculator block',...
['Step';'Value of transition';'Initital Value of transition';...
'Date of initial output event';'Dynamical Value(0:No/1:Yes)'],...
list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1),exprs);
if ~ok then break,end;
if ok then
if dyn_input==1 then
[model,graphics,ok]=check_io(model,graphics,[1;1],[],1,1)
model.in=[1;1]
else
[model,graphics,ok]=check_io(model,graphics,1,[],1,1)
model.in=1
end
model.dstate=[0;init_trans]
model.rpar=[step;transition]
model.ipar=[dyn_input]
model.firing=init_date
graphics.exprs=exprs
x.graphics=graphics; x.model=model;
break
end
end
case 'define' then
step=1
transition=2*%pi
init_trans=2*%pi
init_date=0
dyn_input=0
model=scicos_model()
model.sim=list('vcoevt',4)
model.in=[1]
model.out=[]
model.evtin=[1]
model.evtout=1
model.dstate=[0;init_trans]
model.rpar=[step;transition]
model.ipar=[dyn_input]
model.blocktype='d'
model.firing=init_date
model.dep_ut=[%f %f]
gr_i=['txt=[''VCOEVT''];';
'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');']
exprs=[string(step),string('2*%pi'),string('2*%pi'),string(init_date),string(dyn_input)]
x=standard_define([2.5 2],model,exprs,gr_i)
end
endfunction
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -