📄 fmoduloc_f.sci
字号:
//FMODULOC_f Scicos Float Moduloc function block
//Classical interface function ver1.0 - scilab-2.7
//19 octobre 2003 - IRCOM GROUP - Author : A.Layec
function [x,y,typ]=FMODULOC_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,ampl,exprs]=getvalue('Scicos Float Moduloc function block',...
['Amplitude'],list('vec',-1),exprs)
if ~ok then break,end;
Nu=size(ampl,'*');if Nu==0 then Nu=[],end
if ok then
graphics.exprs=exprs
model.rpar=ampl
model.in=Nu;model.out=Nu
x.graphics=graphics;x.model=model
break;
end
end
case 'define' then
Nu=1
ampl=1
model=scicos_model()
model.sim=list('fmoduloc',2)
model.in=Nu
model.out=Nu
model.evtin=[]
model.evtout=[]
model.dstate=[]
model.rpar=ampl
model.ipar=[]
model.blocktype='d'
model.firing=[]
model.dep_ut=[%t %f]
gr_i=['pat=xget(''pattern'')'
'fnt=xget(''font'')'
'xarrows(orig(1)+[0.493;0.496]*sz(1),orig(2)+[0.028;0.95]*sz(2),4,-1)'
'xarrows(orig(1)+[0.036;0.973]*sz(1),orig(2)+[0.472;0.472]*sz(2),4,-1)'
'xpoly(orig(1)+[0.096;0.196;0.196;0.818;0.818;0.936]*sz(1),orig(2)+[0.299;0.472;0.088;0.887;0.472;0.61]*sz(2),"'lines"')'
'xset(''thickness'',thick)'
'xset(''pattern'',pat)'
'xset(''font'',fnt(1),fnt(2))']
exprs=string(ampl)
x=standard_define([2 2],model,exprs,gr_i)
x.graphics.id="FMODULOC"
end
endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -