summaryrefslogtreecommitdiff
path: root/js/NonLinear/MAXMIN.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/NonLinear/MAXMIN.js')
-rw-r--r--js/NonLinear/MAXMIN.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/NonLinear/MAXMIN.js b/js/NonLinear/MAXMIN.js
index 925000a4..9401773e 100644
--- a/js/NonLinear/MAXMIN.js
+++ b/js/NonLinear/MAXMIN.js
@@ -8,9 +8,9 @@ function MAXMIN() {
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
this.model.ipar = new ScilabDouble([0]);
- var exprs = [string(transpose([2,1,1]))];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MAXMIN\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = [string(transpose([2,1,1]))];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MAXMIN\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
this.x.graphics.style = "MAXMIN;displayedLabel=MAX";
return new BasicBlock(this.x);
}
@@ -29,12 +29,13 @@ function MAXMIN() {
this.mm = parseFloat(arguments[0]["mm"])
this.nin = arguments[0]["nin"]
this.zcr = parseFloat(arguments[0]["zcr"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
- [ok,this.mm,this.nin,this.zcr,exprs] = scicos_getvalue("Set Max/Min block parameters",["Min (1) or Max (2) ","Number of input vectors (1 or 2)","zero-crossing (1: yes, 0;no)"],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.mm,this.nin,this.zcr,this.exprs] = scicos_getvalue("Set Max/Min block parameters",["Min (1) or Max (2) ","Number of input vectors (1 or 2)","zero-crossing (1: yes, 0;no)"],list("vec",1,"vec",1,"vec",1),this.exprs);
if (!ok) {
break;
}
@@ -75,7 +76,7 @@ function MAXMIN() {
var label = "MAX";
}
this.graphics.style = new ScilabString(["MAXMIN;displayedLabel="+label]);
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;