summaryrefslogtreecommitdiff
path: root/js/Branching/SWITCH2_m.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Branching/SWITCH2_m.js')
-rw-r--r--js/Branching/SWITCH2_m.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Branching/SWITCH2_m.js b/js/Branching/SWITCH2_m.js
index a3a2c7fc..b7ea3784 100644
--- a/js/Branching/SWITCH2_m.js
+++ b/js/Branching/SWITCH2_m.js
@@ -18,9 +18,9 @@ function SWITCH2_m() {
this.model.nmode = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SWITCH2_m\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SWITCH2_m\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
SWITCH2_m.prototype.details = function SWITCH2_m() {
@@ -40,12 +40,13 @@ function SWITCH2_m() {
this.rule = parseFloat(arguments[0]["rule"])
this.thra = arguments[0]["thra"]
this.nzz = parseFloat(arguments[0]["nzz"])
+ 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.ot,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",["Datatype (1=real double 2=complex 3=int32 ...)","pass first input if: u2>=a (0), u2>a (1), u2~=a (2)","threshold a","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.ot,this.rule,this.thra,this.nzz,this.exprs] = scicos_getvalue("Set parameters",["Datatype (1=real double 2=complex 3=int32 ...)","pass first input if: u2>=a (0), u2>a (1), u2~=a (2)","threshold a","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1,"vec",1),this.exprs);
if (!ok) {
break;
}
@@ -56,7 +57,7 @@ function SWITCH2_m() {
if ((this.rule>2)) {
this.rule = 2;
}
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.ipar = new ScilabDouble([this.rule]);
this.model.rpar = new ScilabDouble([this.thra]);
if (this.nzz!=0) {