diff options
author | Sunil Shetye | 2018-07-09 11:43:39 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-09 12:16:25 +0530 |
commit | 62b1d7dd9183ed75733b44104890586b03818214 (patch) | |
tree | 9859e9ca295df98df945bd5fcccc3a264e8bede1 /js/Misc/DIFF_f.js | |
parent | 5c011853630a1b466ef4789d5b600dd530d0a3ec (diff) | |
download | sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2 sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip |
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Misc/DIFF_f.js')
-rw-r--r-- | js/Misc/DIFF_f.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/js/Misc/DIFF_f.js b/js/Misc/DIFF_f.js index f9aba023..cc27fc20 100644 --- a/js/Misc/DIFF_f.js +++ b/js/Misc/DIFF_f.js @@ -2,16 +2,16 @@ function DIFF_f() { DIFF_f.prototype.define = function DIFF_f() { this.x0 = [[0],[0]]; - model = scicos_model(); - model.sim = list("diffblk",10001); - model.in1 = 1; - model.out = 1; - model.state = this.x0; - model.blocktype = "c"; - model.dep_ut = [false,true]; + this.model = scicos_model(); + this.model.sim = list("diffblk",10001); + this.model.in1 = new ScilabDouble(1); + this.model.out = new ScilabDouble(1); + this.model.state = this.x0; + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [false,true]; exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]]; gr_i = []; - this.x = standard_define([2,2],model,exprs,gr_i); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } DIFF_f.prototype.details = function DIFF_f() { @@ -30,16 +30,16 @@ function DIFF_f() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",1,"vec",1),exprs); if (!ok) { break; } graphics.exprs = exprs; - model.state = [[this.x0.slice()],[this.xd0.slice()]]; + this.model.state = [[this.x0.slice()],[this.xd0.slice()]]; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } this.x.model.firing = []; |