diff options
Diffstat (limited to 'js/Electrical/Resistor.js')
-rw-r--r-- | js/Electrical/Resistor.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js index 3cdf9f1f..efec6abd 100644 --- a/js/Electrical/Resistor.js +++ b/js/Electrical/Resistor.js @@ -3,18 +3,18 @@ function Resistor() { Resistor.prototype.define = function Resistor() { this.model = scicos_model(); this.R = 0.01; - this.model.rpar = new ScilabDouble(this.R); - this.model.sim = new ScilabString("resistor"); - this.model.blocktype = new ScilabString("c"); + this.model.rpar = new ScilabDouble([this.R]); + this.model.sim = new ScilabString(["resistor"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "Resistor"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list("R",list(this.R)); - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"*"),1)); - this.model.out = new ScilabDouble(ones(size(mo.outputs,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); exprs = string(this.R); gr_i = []; this.x = standard_define([2,1],this.model,exprs,list(gr_i,0)); @@ -41,8 +41,8 @@ function Resistor() { if (!ok) { break; } - this.model.rpar = new ScilabDouble(this.R); - this.model.equations.parameters[2] = list(new ScilabDouble(this.R)); + this.model.rpar = new ScilabDouble([this.R]); + this.model.equations.parameters[2] = list(new ScilabDouble([this.R])); graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = this.model; |