📄 eulerintegral_f.sci
字号:
//EULERINTEGRAL_f Scicos vector intgerator by Euler method
//Classical interface function ver1.0 - scilab-2.7
//17 novembre 2003 - IRCOM GROUP - Author : A.Layec
function [x,y,typ]=EULERINTEGRAL_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;exprs=graphics.exprs
model=arg1.model;
while %t do
text=['Set discrete integral parameters';'(Euler method)']
[ok,step,x0,exprs]=getvalue(text,..
['Step';'Initial state'],list('vec',1,'vec',-1),exprs)
nu=size(x0,'*')
if ~ok then break,end
graphics.exprs=exprs;
model.in=nu
model.out=nu
model.rpar=step
model.dstate=x0(:)
x.graphics=graphics;x.model=model
break
end
case 'define' then
x0=0
step=1
nu=1
model=scicos_model()
model.sim=list('int_euler',2)
model.in=nu
model.out=nu
model.evtin=1
model.evtout=[]
model.rpar=step
model.dstate=x0
model.blocktype='d'
model.dep_ut=[%f %f]
exprs=[string(step);strcat(sci2exp(x0))]
gr_i=['thick=xget(''thickness'')'
'pat=xget(''pattern'')'
'fnt=xget(''font'')'
'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))'
]
x=standard_define([2 2],model,exprs,gr_i)
x.graphics.id="Euler"
end
endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -