diff options
author | Sunil Shetye | 2018-07-11 13:05:13 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-11 15:21:08 +0530 |
commit | 079d0b4a3ec15a4d7d2644484d116df9d1c694bb (patch) | |
tree | 785ed59b5b238203a9e91f3e323da59d1083d86e /js/MatrixOp/MATCATV.js | |
parent | 0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff) | |
download | sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2 sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip |
fix assignment to list
Diffstat (limited to 'js/MatrixOp/MATCATV.js')
-rw-r--r-- | js/MatrixOp/MATCATV.js | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/js/MatrixOp/MATCATV.js b/js/MatrixOp/MATCATV.js index c6a998f3..a54a2a05 100644 --- a/js/MatrixOp/MATCATV.js +++ b/js/MatrixOp/MATCATV.js @@ -1,10 +1,10 @@ /* autogenerated from "macros/MatrixOp/MATCATV.sci" */ function MATCATV() { MATCATV.prototype.define = function MATCATV() { - l1 = [[2],[2]]; + var l1 = [[2],[2]]; this.model = scicos_model(); - function_name = "mat_catv"; - funtyp = 4; + var function_name = "mat_catv"; + var funtyp = 4; this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp])); this.model.in2 = new ScilabDouble([-1],[-1]); this.model.in1 = new ScilabDouble([-2],[-3]); @@ -21,8 +21,8 @@ function MATCATV() { this.model.blocktype = new ScilabString(["c"]); this.model.firing = []; this.model.dep_ut = [true,false]; - label = [sci2exp(2)]; - gr_i = []; + var label = [sci2exp(2)]; + var gr_i = []; this.x = standard_define([2,3],this.model,label,gr_i); return new BasicBlock(this.x); } @@ -40,24 +40,27 @@ function MATCATV() { this.lab = arguments[0]["lab"] this.x = arg1; this.model = arg1.model; - graphics = arg1.graphics; - label = graphics.exprs; + var graphics = arg1.graphics; + var label = graphics.exprs; if (size(label,"*")>1) { - label = "size(evstr("+label[2-1]+"),\'*\')"; + var label = "size(evstr("+label[2-1]+"),\'*\')"; } while (true) { [ok,this.nin,this.lab] = scicos_getvalue("Set MATCATV block parameters",["Number od inputs"],list("vec",1),label); if (!ok) { break; } - label = this.lab; - in1 = [-(transpose([2:this.nin+1])),-ones(this.nin,1)]; - it = -ones(this.nin,1); - ot = -1; - out = [0,-1]; - [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]); + var label = this.lab; + var in1 = [-(transpose([2:this.nin+1])),-ones(this.nin,1)]; + var it = -ones(this.nin,1); + var ot = -1; + var out = [0,-1]; + var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]) + this.model = tmpvar0[0] + var graphics = tmpvar0[1] + var ok = tmpvar0[2]; if (ok) { - funtyp = 4; + var funtyp = 4; this.model.sim = list(new ScilabString(["mat_catv"]), new ScilabDouble([funtyp])); graphics.exprs = label; arg1.graphics = graphics; |