//OVERLAPRSR_f Scicos convol block //Classical interface function ver1.0 - scilab-3 //24 décembre 2004 Author : - IRCOM GROUP - A.Layec function [x,y,typ]=OVERLAPRSR_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,nu,N,herit,exprs]=getvalue('Scicos Right Shift Register block',... ['Size of inputs';'Number of shift';'Inherit (no:0, yes:1)'],... list('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=[%t %f] [model,graphics,ok]=check_io(model,graphics,[nu],[nu],1,[]) end graphics.exprs=exprs model.in=nu model.out=nu model.dstate=zeros(nu+N,1) model.ipar=[N] x.graphics=graphics; x.model=model break; end end case 'define' then nu=256 herit=1 N=1 model=scicos_model() model.sim=list('overlaprsr',4) model.in=[nu] model.out=[nu] model.evtin=[] model.evtout=[] model.dstate=zeros(nu+N,1) model.rpar=[] model.ipar=[N] model.blocktype='d' model.firing=[] model.dep_ut=[%t %f] gr_i=['txt=[''Right Shift'';''Register''];'; 'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');'] exprs=[string(nu),string(N),string(herit)] x=standard_define([2 2],model,exprs,gr_i) end endfunction