diff options
author | Sunil Shetye | 2018-07-11 15:19:38 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-11 15:21:08 +0530 |
commit | 0047c3bea1d86b12a08544f6f0833c63e77f6eac (patch) | |
tree | 36fc72fa9e5ea73c64a44e061b2c9c80e0307884 /js/Misc/generic_block.js | |
parent | 079d0b4a3ec15a4d7d2644484d116df9d1c694bb (diff) | |
download | sci2js-0047c3bea1d86b12a08544f6f0833c63e77f6eac.tar.gz sci2js-0047c3bea1d86b12a08544f6f0833c63e77f6eac.tar.bz2 sci2js-0047c3bea1d86b12a08544f6f0833c63e77f6eac.zip |
support vector also
Diffstat (limited to 'js/Misc/generic_block.js')
-rw-r--r-- | js/Misc/generic_block.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/js/Misc/generic_block.js b/js/Misc/generic_block.js index 93cefd86..e3a2ae82 100644 --- a/js/Misc/generic_block.js +++ b/js/Misc/generic_block.js @@ -7,15 +7,15 @@ function generic_block() { this.model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp])); this.model.in1 = new ScilabDouble([1]); this.model.out = new ScilabDouble([1]); - this.model.evtin = []; - this.model.evtout = []; - this.model.state = []; - this.model.dstate = []; - this.model.rpar = []; - this.model.ipar = []; + this.model.evtin = new ScilabDouble([]); + this.model.evtout = new ScilabDouble([]); + this.model.state = new ScilabDouble([]); + this.model.dstate = new ScilabDouble([]); + this.model.rpar = new ScilabDouble([]); + this.model.ipar = new ScilabDouble([]); this.model.blocktype = new ScilabString(["c"]); - this.model.firing = []; - this.model.dep_ut = [true,false]; + this.model.firing = new ScilabDouble([]); + this.model.dep_ut = new ScilabDouble([true,false]); var label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.firing)],["y"],["n"]]; var gr_i = []; this.x = standard_define([2,2],this.model,label,gr_i); @@ -114,12 +114,12 @@ function generic_block() { var needcompile = 4; } this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp])); - this.model.state = this.xx; - this.model.dstate = this.z; - this.model.rpar = this.rpar; + this.model.state = new ScilabDouble(this.xx); + this.model.dstate = new ScilabDouble(this.z); + this.model.rpar = new ScilabDouble(this.rpar); this.model.ipar = new ScilabDouble([this.ipar]); this.model.firing = new ScilabDouble([this.auto0]); - this.model.dep_ut = dep_ut; + this.model.dep_ut = new ScilabDouble(dep_ut); arg1.model = this.model; graphics.exprs = label; arg1.graphics = graphics; |