diff options
Diffstat (limited to 'js/Threshold')
-rw-r--r-- | js/Threshold/GENERAL_f.js | 33 | ||||
-rw-r--r-- | js/Threshold/GENERAL_f.pickle | 41 | ||||
-rw-r--r-- | js/Threshold/NEGTOPOS_f.js | 2 | ||||
-rw-r--r-- | js/Threshold/POSTONEG_f.js | 4 | ||||
-rw-r--r-- | js/Threshold/ZCROSS_f.js | 14 |
5 files changed, 47 insertions, 47 deletions
diff --git a/js/Threshold/GENERAL_f.js b/js/Threshold/GENERAL_f.js index ff011cc2..70e6177c 100644 --- a/js/Threshold/GENERAL_f.js +++ b/js/Threshold/GENERAL_f.js @@ -1,7 +1,7 @@ /* autogenerated from "macros/Threshold/GENERAL_f.sci" */ function GENERAL_f() { GENERAL_f.prototype.define = function GENERAL_f() { - rpar = [[0],[0],[0],[0]]; + var rpar = [[0],[0],[0],[0]]; this.in1 = 1; this.out = 1; this.model = scicos_model(); @@ -13,8 +13,8 @@ function GENERAL_f() { this.model.blocktype = new ScilabString(["z"]); this.model.firing = new ScilabDouble([-ones(this.out,1)]); this.model.dep_ut = [true,false]; - exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]]; - gr_i = []; + var exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]]; + var gr_i = []; this.x = standard_define([3,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } @@ -32,27 +32,30 @@ function GENERAL_f() { this.in1 = parseFloat(arguments[0]["in1"]) this.out = parseFloat(arguments[0]["out"]) this.x = arg1; - graphics = arg1.graphics; - exprs = graphics.exprs; + var graphics = arg1.graphics; + var exprs = graphics.exprs; this.model = arg1.model; - rpar = this.model.rpar; + var rpar = this.model.rpar; this.in1 = this.model.in1; this.out = this.model.evtout; - nin = sum(this.in1); - nout = sum(this.out); + var nin = sum(this.in1); + var nout = sum(this.out); [ok,this.in1,this.out,exprs] = scicos_getvalue("Set General Zero-Crossing parameters",["Input size","Number of event output"],list("vec",1,"vec",1),exprs); if (ok) { - [this.model,graphics,ok] = check_io(this.model,graphics,this.in1,[],[],ones(this.out,1)); + var tmpvar0 = check_io(this.model,graphics,this.in1,[],[],ones(this.out,1)) + this.model = tmpvar0[0] + var graphics = tmpvar0[1] + var ok = tmpvar0[2]; if (ok) { - nout1 = this.out; - nin1 = this.in1; + var nout1 = this.out; + var nin1 = this.in1; if (nout==nout1&&nin==nin1) { - rp = matrix(rpar,nout,2^(2*nin)); + var rp = matrix(rpar,nout,2^(2*nin)); } else { - rp = -1*ones(nout1,2^(2*nin1)); + var rp = -1*ones(nout1,2^(2*nin1)); } - n = size(rp,2)/2; - result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice())); + var n = size(rp,2)/2; + var result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice())); if (result!=[]) { rp.slice(1-1,nout1).slice(1-1,2*n) = evstr(result); this.model.nzcross = new ScilabDouble([this.in1]); diff --git a/js/Threshold/GENERAL_f.pickle b/js/Threshold/GENERAL_f.pickle index 7f2734e7..7d76ade0 100644 --- a/js/Threshold/GENERAL_f.pickle +++ b/js/Threshold/GENERAL_f.pickle @@ -17,9 +17,10 @@ S'arg1' p1 S'object' p2 -sS'graphics.exprs' +sS'graphics' p3 -NsS'rpar' +g2 +sS'rpar' p4 S'matrix' p5 @@ -64,49 +65,45 @@ g8 sS'rp.slice(1-1,nout1).slice(1-1,2*n)' p21 g8 -sS'[this.model,graphics,ok]' -p22 -g18 sS'in1' -p23 +p22 g8 sS'model.rpar' -p24 +p23 g5 -sS'graphics' +sS'graphics.exprs' +p24 +NsS'nout1' p25 -g2 -sS'nout1' -p26 NsS'model.nzcross' -p27 +p26 g8 sS'model.blocktype' -p28 +p27 S'string' -p29 +p28 sS'model.dep_ut' -p30 +p29 g15 sS'n' -p31 +p30 g8 sS'exprs' -p32 +p31 g5 sS'gr_i' -p33 +p32 g15 sS'y' -p34 +p33 g15 sS'x' -p35 +p34 g8 sS'model' -p36 +p35 g2 sS'nout' -p37 +p36 g8 s.
\ No newline at end of file diff --git a/js/Threshold/NEGTOPOS_f.js b/js/Threshold/NEGTOPOS_f.js index d665e9da..beea2612 100644 --- a/js/Threshold/NEGTOPOS_f.js +++ b/js/Threshold/NEGTOPOS_f.js @@ -10,7 +10,7 @@ function NEGTOPOS_f() { this.model.blocktype = new ScilabString(["z"]); this.model.firing = new ScilabDouble([-1]); this.model.dep_ut = [true,false]; - gr_i = []; + var gr_i = []; this.x = standard_define([2,2],this.model,[],gr_i); return new BasicBlock(this.x); } diff --git a/js/Threshold/POSTONEG_f.js b/js/Threshold/POSTONEG_f.js index d6b41d93..c2cf96d8 100644 --- a/js/Threshold/POSTONEG_f.js +++ b/js/Threshold/POSTONEG_f.js @@ -1,7 +1,7 @@ /* autogenerated from "macros/Threshold/POSTONEG_f.sci" */ function POSTONEG_f() { POSTONEG_f.prototype.define = function POSTONEG_f() { - rpar = [[-1],[-1],[-1],[0]]; + var rpar = [[-1],[-1],[-1],[0]]; this.model = scicos_model(); this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1])); this.model.nzcross = new ScilabDouble([1]); @@ -11,7 +11,7 @@ function POSTONEG_f() { this.model.blocktype = new ScilabString(["z"]); this.model.dep_ut = [true,false]; this.model.firing = [-1]; - gr_i = []; + var gr_i = []; this.x = standard_define([2,2],this.model,[],gr_i); return new BasicBlock(this.x); } diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js index d9b558ef..f31d3e0a 100644 --- a/js/Threshold/ZCROSS_f.js +++ b/js/Threshold/ZCROSS_f.js @@ -1,7 +1,7 @@ /* autogenerated from "macros/Threshold/ZCROSS_f.sci" */ function ZCROSS_f() { ZCROSS_f.prototype.define = function ZCROSS_f() { - rpar = [[-1],[-1],[0],[0]]; + var rpar = [[-1],[-1],[0],[0]]; this.in1 = 1; this.model = scicos_model(); this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1])); @@ -12,8 +12,8 @@ function ZCROSS_f() { this.model.blocktype = new ScilabString(["z"]); this.model.firing = new ScilabDouble([-1]); this.model.dep_ut = [true,false]; - exprs = strcat(sci2exp(this.in1)); - gr_i = []; + var exprs = strcat(sci2exp(this.in1)); + var gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } @@ -28,8 +28,8 @@ function ZCROSS_f() { ZCROSS_f.prototype.set = function ZCROSS_f() { this.in1 = parseFloat(arguments[0]["in1"]) this.x = arg1; - graphics = arg1.graphics; - exprs = graphics.exprs; + var graphics = arg1.graphics; + var exprs = graphics.exprs; this.model = arg1.model; while (true) { [ok,this.in1,exprs] = scicos_getvalue([["Set Zero-Crossing parameters"],["All surfaces must cross together"]],"Input size",list("vec",1),exprs); @@ -40,9 +40,9 @@ function ZCROSS_f() { if (this.in1<=0) { message("Block must have at least one input"); } else { - kk = 0; + var kk = 0; for (jj=1;jj<=this.in1;jj+=1) { - kk = kk+2^(this.in1+jj-1); + var kk = kk+2^(this.in1+jj-1); } this.model.rpar = new ScilabDouble([-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]); graphics.exprs = exprs; |