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/GAIN_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/Linear/GAIN_f.js')
-rw-r--r-- | js/Linear/GAIN_f.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/js/Linear/GAIN_f.js b/js/Linear/GAIN_f.js index f0fd2265..a7ea5848 100644 --- a/js/Linear/GAIN_f.js +++ b/js/Linear/GAIN_f.js @@ -4,16 +4,16 @@ function GAIN_f() { this.gain = 1; in1 = 1; out = 1; - model = scicos_model(); - model.sim = "gain"; - model.in1 = 1; - model.out = 1; - model.rpar = this.gain; - model.blocktype = "c"; - model.dep_ut = [true,false]; + this.model = scicos_model(); + this.model.sim = new ScilabString("gain"); + this.model.in1 = new ScilabDouble(1); + this.model.out = new ScilabDouble(1); + this.model.rpar = new ScilabDouble(this.gain); + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [true,false]; exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]]; 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); } GAIN_f.prototype.details = function GAIN_f() { @@ -30,7 +30,7 @@ function GAIN_f() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]); if (!ok) { @@ -40,12 +40,12 @@ function GAIN_f() { message("Gain must have at least one element"); } else { [out,in1] = size(this.gain); - [model,graphics,ok] = check_io(model,graphics,in1,out,[],[]); + [model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]); if (ok) { graphics.exprs = exprs; - model.rpar = this.gain.slice(); + this.model.rpar = this.gain.slice(); this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } |