diff options
author | Sunil Shetye | 2018-07-12 23:16:08 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-13 10:21:08 +0530 |
commit | 214ade87a6cef2bf55f9b9f2848ffafc02f37f18 (patch) | |
tree | 50fdfe7b1e8850622825e362ca865be3f0911009 /js/NonLinear/EXPBLK_m.js | |
parent | a2bfd6050ab2b5b6bbede92393b1f61d4ecc25aa (diff) | |
download | sci2js-214ade87a6cef2bf55f9b9f2848ffafc02f37f18.tar.gz sci2js-214ade87a6cef2bf55f9b9f2848ffafc02f37f18.tar.bz2 sci2js-214ade87a6cef2bf55f9b9f2848ffafc02f37f18.zip |
add more global variables
Diffstat (limited to 'js/NonLinear/EXPBLK_m.js')
-rw-r--r-- | js/NonLinear/EXPBLK_m.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/js/NonLinear/EXPBLK_m.js b/js/NonLinear/EXPBLK_m.js index a974ab01..7b19a711 100644 --- a/js/NonLinear/EXPBLK_m.js +++ b/js/NonLinear/EXPBLK_m.js @@ -14,9 +14,9 @@ function EXPBLK_m() { this.model.rpar = new ScilabDouble([this.a]); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = new ScilabDouble([true,false]); - var exprs = ["%e"]; - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EXPBLK_m\",sz(1),sz(2));"]); - this.x = standard_define([2,2],this.model,exprs,gr_i); + this.exprs = ["%e"]; + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EXPBLK_m\",sz(1),sz(2));"]); + this.x = standard_define([2,2],this.model,this.exprs,this.gr_i); return new BasicBlock(this.x); } EXPBLK_m.prototype.details = function EXPBLK_m() { @@ -29,22 +29,23 @@ function EXPBLK_m() { } EXPBLK_m.prototype.set = function EXPBLK_m() { this.a = parseFloat(arguments[0]["a"]) + this.exprs = parseFloat(arguments[0]["exprs"]) this.x = arg1; this.graphics = arg1.graphics; - var exprs = this.graphics.exprs; + this.exprs = this.graphics.exprs; this.model = arg1.model; - if (size(exprs,"*")==2) { - var exprs = exprs[2-1]; + if (size(this.exprs,"*")==2) { + this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.a,exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),exprs); + [ok,this.a,this.exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),this.exprs); if (!ok) { break; } if (or(this.a<=0)) { message("a^u : a must be positive"); } else { - this.graphics.exprs = new ScilabDouble([exprs]); + this.graphics.exprs = new ScilabDouble([this.exprs]); this.model.rpar = new ScilabDouble([this.a]); this.x.graphics = this.graphics; this.x.model = this.model; |