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/Linear/DLR.js | |
parent | 5c011853630a1b466ef4789d5b600dd530d0a3ec (diff) | |
download | sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2 sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip |
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Linear/DLR.js')
-rw-r--r-- | js/Linear/DLR.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/js/Linear/DLR.js b/js/Linear/DLR.js index 2ad0c0d5..4107e913 100644 --- a/js/Linear/DLR.js +++ b/js/Linear/DLR.js @@ -7,17 +7,17 @@ function DLR() { C = 1; D = 0; exprs = [["1"],["1+z"]]; - model = scicos_model(); - model.sim = list("dsslti4",4); - model.in1 = 1; - model.out = 1; - model.evtin = 1; - model.dstate = x0.slice(); - model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]]; - model.blocktype = "d"; - model.dep_ut = [false,false]; + this.model = scicos_model(); + this.model.sim = list("dsslti4",4); + this.model.in1 = new ScilabDouble(1); + this.model.out = new ScilabDouble(1); + this.model.evtin = new ScilabDouble(1); + this.model.dstate = x0.slice(); + this.model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]]; + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [false,false]; gr_i = []; - this.x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } DLR.prototype.details = function DLR() { @@ -36,8 +36,8 @@ function DLR() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; - x0 = model.dstate; + this.model = arg1.model; + x0 = this.model.dstate; ns = prod(size(x0)); PREVAR_scicos_context = PREVAR_scicos_context; PREVAR_scicos_context.z = %z; @@ -61,18 +61,18 @@ function DLR() { x0[ns1-1][1-1] = 0; } rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]]; - model.dstate = x0; - model.rpar = rpar; + this.model.dstate = x0; + this.model.rpar = rpar; if (norm(D,1)!=0) { mmm = [true,false]; } else { mmm = [false,false]; } - if (or(model.dep_ut!=mmm)) { - model.dep_ut = mmm; + if (or(this.model.dep_ut!=mmm)) { + this.model.dep_ut = mmm; } this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } |