diff options
Diffstat (limited to 'js/Linear/GAINBLK_f.js')
-rw-r--r-- | js/Linear/GAINBLK_f.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/js/Linear/GAINBLK_f.js b/js/Linear/GAINBLK_f.js index 18b30def..78c39c12 100644 --- a/js/Linear/GAINBLK_f.js +++ b/js/Linear/GAINBLK_f.js @@ -4,16 +4,16 @@ function GAINBLK_f() { this.gain = 1; in1 = 1; out = 1; - model = scicos_model(); - model.sim = "gain"; - model.in1 = in1; - model.out = out; - 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(in1); + this.model.out = new ScilabDouble(out); + this.model.rpar = new ScilabDouble(this.gain); + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [true,false]; exprs = [strcat(sci2exp(this.gain))]; 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); } GAINBLK_f.prototype.details = function GAINBLK_f() { @@ -30,7 +30,7 @@ function GAINBLK_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 GAINBLK_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; } } |