3 // Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 // See the file ../license.txt
22 function [x,y,typ]=GEN_SQR(job,arg1,arg2)
23 //Generated from SuperBlock on 8-Feb-2008
32 graphics=arg1.graphics;
35 "Set GEN_SQR parameters"
37 ["Amin";"Amax";"rule";"F"]
41 "Initial Value( 1= Minimum Value 2= Maximum Value)";
44 list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1)
45 scicos_context=struct()
49 [ok,scicos_context.Amin,scicos_context.Amax,scicos_context.rule,scicos_context.F,exprs]=scicos_getvalue(Btitre,Bitems,Ss,exprs)
53 %scicos_context=scicos_context;
55 [%scicos_context,ierr]=script2var(sblock.props.context,%scicos_context)
57 [sblock,%w,needcompile2,ok]=do_eval(sblock,list())
59 y=max(2,needcompile,needcompile2)
60 x.graphics.exprs=exprs
70 scs_m_1=scicos_diagram(..
71 version="scicos4.2",..
72 props=scicos_params(..
73 wpar=[-176.97473,421.18646,173.61587,524.41503,827,480,0,15,827,480,755,614,1.4],..
75 tol=[0.0001,0.000001,1.000D-10,100001,0,0],..
77 context=["if typeof(Amin)<>typeof(Amax) then error(''Minimum value and Maximum value must have the same type'');end";
78 "if and(rule<>[1;2]) then error(''Initial Value must be 1 (for Min) or 2 (for Max)'');end";
79 "if Amin>Amax then error(''Maximum value must be greater than the Minimum Value'');end";
83 options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],..
84 list([5,1],[4,1]),[0.8,0.8,0.8]),..
88 scs_m_1.objs(1)=scicos_block(..
90 graphics=scicos_graphics(..
91 orig=[18.229901,339.5057],..
95 exprs=["1";"2";"rule"],..
104 model=scicos_model(..
105 sim=list("counter",4),..
128 scs_m_1.objs(2)=scicos_block(..
130 graphics=scicos_graphics(..
131 orig=[38.096074,293.82198],..
144 model=scicos_model(..
145 sim=list("cstblk4_m",4),..
168 scs_m_1.objs(3)=scicos_block(..
170 graphics=scicos_graphics(..
171 orig=[37.378886,245.02389],..
184 model=scicos_model(..
185 sim=list("cstblk4_m",4),..
208 scs_m_1.objs(4)=scicos_block(..
210 graphics=scicos_graphics(..
211 orig=[116.26954,269.42294],..
215 exprs=["-1";"2";"1"],..
222 in_implicit=["E";"E"],..
224 model=scicos_model(..
225 sim=list("selector_m",4),..
248 scs_m_1.objs(5)=scicos_link(..
249 xx=[86.667502;107.69811;107.69811],..
250 yy=[313.82198;313.82198;296.0896],..
256 scs_m_1.objs(6)=scicos_link(..
257 xx=[85.950315;107.69811;107.69811],..
258 yy=[265.02389;265.02389;282.75627],..
264 scs_m_1.objs(7)=scicos_block(..
266 graphics=scicos_graphics(..
267 orig=[106.9461,339.7496],..
271 exprs=["2";"0";"0"],..
280 model=scicos_model(..
281 sim=list("eselect",-2),..
304 scs_m_1.objs(8)=scicos_link(..
305 xx=[86.80133;98.374671],..
306 yy=[359.5057;359.7496],..
312 scs_m_1.objs(9)=scicos_link(..
313 xx=[126.9461;129.60287],..
314 yy=[334.03532;315.13722],..
320 scs_m_1.objs(10)=scicos_link(..
321 xx=[146.9461;142.93621],..
322 yy=[334.03532;315.13722],..
328 scs_m_1.objs(11)=mlist("Deleted")
329 scs_m_1.objs(12)=mlist("Deleted")
330 scs_m_1.objs(13)=scicos_block(..
332 graphics=scicos_graphics(..
333 orig=[184.40238,278.75198],..
346 model=scicos_model(..
370 scs_m_1.objs(14)=scicos_link(..
371 xx=[164.84097;184.40238],..
372 yy=[289.42294;288.75198],..
378 scs_m_1.objs(15)=scicos_block(..
380 graphics=scicos_graphics(..
381 orig=[18.313686,403.57431],..
394 model=scicos_model(..
418 scs_m_1.objs(16)=scicos_link(..
419 xx=[48.313686;48.229901],..
420 yy=[403.57431;385.21998],..
448 model.equations=list()
460 x=standard_define([3,2],model,exprs,gr_i)