diff options
Diffstat (limited to 'js/Linear/DIFF_c.js')
-rw-r--r-- | js/Linear/DIFF_c.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js index 0583cc59..10147a4d 100644 --- a/js/Linear/DIFF_c.js +++ b/js/Linear/DIFF_c.js @@ -9,9 +9,9 @@ function DIFF_c() { this.model.state = new ScilabDouble(this.x0); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = new ScilabDouble([false,true]); - var exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]]; - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DIFF_c\",sz(1),sz(2));"]); - this.x = standard_define([2,2],this.model,exprs,gr_i); + this.exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]]; + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DIFF_c\",sz(1),sz(2));"]); + this.x = standard_define([2,2],this.model,this.exprs,this.gr_i); return new BasicBlock(this.x); } DIFF_c.prototype.details = function DIFF_c() { @@ -27,13 +27,14 @@ function DIFF_c() { DIFF_c.prototype.set = function DIFF_c() { this.x0 = inverse(arguments[0]["x0"]) this.xd0 = inverse(arguments[0]["xd0"]) + 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) { var ask_again = false; - [ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",-1,"vec",-1),exprs); + [ok,this.x0,this.xd0,this.exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",-1,"vec",-1),this.exprs); if (!ok) { break; } @@ -50,7 +51,7 @@ function DIFF_c() { var ask_again = true; } if (!ask_again) { - this.graphics.exprs = new ScilabDouble([exprs]); + this.graphics.exprs = new ScilabDouble([this.exprs]); this.model.state = new ScilabDouble([this.x0],[this.xd0]); this.model.out = new ScilabDouble([N]); this.model.in1 = new ScilabDouble([N]); |