diff options
Diffstat (limited to 'js/NonLinear/SAT_f.js')
-rw-r--r-- | js/NonLinear/SAT_f.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/js/NonLinear/SAT_f.js b/js/NonLinear/SAT_f.js index 8b87bf2b..f422fef7 100644 --- a/js/NonLinear/SAT_f.js +++ b/js/NonLinear/SAT_f.js @@ -1,19 +1,19 @@ /* autogenerated from "macros/NonLinear/SAT_f.sci" */ function SAT_f() { SAT_f.prototype.define = function SAT_f() { - minp = -1; - maxp = 1; + this.minp = -1; + this.maxp = 1; slope = 1; - rpar = [[minp],[maxp],[slope]]; + rpar = [[this.minp],[this.maxp],[slope]]; model = scicos_model(); model.sim = list("lusat",1); model.in1 = 1; model.nzcross = 2; model.out = 1; - model.rpar = [[minp],[maxp],[slope]]; + model.rpar = [[this.minp],[this.maxp],[slope]]; model.blocktype = "c"; model.dep_ut = [true,false]; - exprs = [[string(minp)],[string(maxp)],[string(slope)]]; + exprs = [[string(this.minp)],[string(this.maxp)],[string(slope)]]; gr_i = []; this.x = standard_define([2,2],model,exprs,gr_i); return new BasicBlock(this.x); @@ -29,16 +29,16 @@ function SAT_f() { exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,minp,maxp,pente,exprs] = scicos_getvalue("Set Saturation parameters",[["Min"],["Max"],["Slope"]],list("vec",1,"vec",1,"vec",1),exprs); + [ok,this.minp,this.maxp,this.pente,exprs] = scicos_getvalue("Set Saturation parameters",[["Min"],["Max"],["Slope"]],list("vec",1,"vec",1,"vec",1),exprs); if (!ok) { break; } - if (maxp<=0) { + if (this.maxp<=0) { message("Max must be strictly positive"); - } else if (pente<=0) { + } else if (this.pente<=0) { message("Slope must be strictly positive"); } else { - rpar = [[minp/pente],[maxp/pente],[pente]]; + rpar = [[this.minp/this.pente],[this.maxp/this.pente],[this.pente]]; model.rpar = rpar; model.firing = []; graphics.exprs = exprs; |