diff options
Diffstat (limited to 'js/Linear')
35 files changed, 261 insertions, 261 deletions
diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js index bafc0ea1..9bc85d52 100644 --- a/js/Linear/BIGSOM_f.js +++ b/js/Linear/BIGSOM_f.js @@ -3,11 +3,11 @@ function BIGSOM_f() { BIGSOM_f.prototype.define = function BIGSOM_f() { this.sgn = [[1],[1]]; this.model = scicos_model(); - this.model.sim = list(new ScilabString("sum"),new ScilabDouble(2)); + this.model.sim = list(new ScilabString(["sum"]), new ScilabDouble([2])); this.model.in1 = [[-1],[-1]]; - this.model.out = new ScilabDouble(-1); + this.model.out = new ScilabDouble([-1]); this.model.rpar = this.sgn; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; exprs = sci2exp(this.sgn); gr_i = []; diff --git a/js/Linear/CLINDUMMY_f.js b/js/Linear/CLINDUMMY_f.js index 55895e48..db4f00c3 100644 --- a/js/Linear/CLINDUMMY_f.js +++ b/js/Linear/CLINDUMMY_f.js @@ -3,9 +3,9 @@ function CLINDUMMY_f() { CLINDUMMY_f.prototype.define = function CLINDUMMY_f() { x0 = 0; this.model = scicos_model(); - this.model.sim = list(new ScilabString("cdummy"),new ScilabDouble(4)); - this.model.state = new ScilabDouble(x0); - this.model.blocktype = new ScilabString("c"); + this.model.sim = list(new ScilabString(["cdummy"]), new ScilabDouble([4])); + this.model.state = new ScilabDouble([x0]); + this.model.blocktype = new ScilabString(["c"]); this.model.firing = []; this.model.dep_ut = [false,true]; gr_i = []; diff --git a/js/Linear/CLR.js b/js/Linear/CLR.js index 447f9ce7..0083f80e 100644 --- a/js/Linear/CLR.js +++ b/js/Linear/CLR.js @@ -8,12 +8,12 @@ function CLR() { D = 0; exprs = [["1"],["1+s"]]; this.model = scicos_model(); - this.model.sim = list(new ScilabString("csslti4"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.state = new ScilabDouble(x0); + this.model.sim = list(new ScilabString(["csslti4"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.state = new ScilabDouble([x0]); this.model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]]; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; gr_i = []; this.x = standard_define([3,2],this.model,exprs,gr_i); diff --git a/js/Linear/CLR_f.js b/js/Linear/CLR_f.js index 5f862678..75c60598 100644 --- a/js/Linear/CLR_f.js +++ b/js/Linear/CLR_f.js @@ -8,12 +8,12 @@ function CLR_f() { D = 0; exprs = [["1"],["1+s"]]; this.model = scicos_model(); - this.model.sim = list(new ScilabString("csslti"),new ScilabDouble(1)); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.state = new ScilabDouble(x0); + this.model.sim = list(new ScilabString(["csslti"]), new ScilabDouble([1])); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.state = new ScilabDouble([x0]); this.model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]]; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; gr_i = []; this.x = standard_define([2.5,2.5],this.model,exprs,gr_i); diff --git a/js/Linear/CLSS.js b/js/Linear/CLSS.js index e721700d..edb1f1df 100644 --- a/js/Linear/CLSS.js +++ b/js/Linear/CLSS.js @@ -9,12 +9,12 @@ function CLSS() { in1 = 1; out = 1; this.model = scicos_model(); - this.model.sim = list(new ScilabString("csslti4"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(in1); - this.model.out = new ScilabDouble(out); - this.model.state = new ScilabDouble(this.x0); + this.model.sim = list(new ScilabString(["csslti4"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([in1]); + this.model.out = new ScilabDouble([out]); + this.model.state = new ScilabDouble([this.x0]); this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]]; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]]; gr_i = []; diff --git a/js/Linear/CLSS_f.js b/js/Linear/CLSS_f.js index 8cb38f15..c2a8963b 100644 --- a/js/Linear/CLSS_f.js +++ b/js/Linear/CLSS_f.js @@ -9,12 +9,12 @@ function CLSS_f() { in1 = 1; out = 1; this.model = scicos_model(); - this.model.sim = list(new ScilabString("csslti"),new ScilabDouble(1)); - this.model.in1 = new ScilabDouble(in1); - this.model.out = new ScilabDouble(out); - this.model.state = new ScilabDouble(this.x0); + this.model.sim = list(new ScilabString(["csslti"]), new ScilabDouble([1])); + this.model.in1 = new ScilabDouble([in1]); + this.model.out = new ScilabDouble([out]); + this.model.state = new ScilabDouble([this.x0]); this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]]; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]]; gr_i = []; diff --git a/js/Linear/DELAYV_f.js b/js/Linear/DELAYV_f.js index 1f569d9b..882d20ee 100644 --- a/js/Linear/DELAYV_f.js +++ b/js/Linear/DELAYV_f.js @@ -6,14 +6,14 @@ function DELAYV_f() { this.zz0 = z0.slice(1-1,$-1); this.T = 1; this.model = scicos_model(); - this.model.sim = list(new ScilabString("delayv"),new ScilabDouble(1)); + this.model.sim = list(new ScilabString(["delayv"]), new ScilabDouble([1])); this.model.in1 = [[this.nin],[1]]; - this.model.out = new ScilabDouble(this.nin); - this.model.evtin = new ScilabDouble(1); + this.model.out = new ScilabDouble([this.nin]); + this.model.evtin = new ScilabDouble([1]); this.model.evtout = [[1],[1]]; - this.model.dstate = new ScilabDouble(z0); - this.model.rpar = new ScilabDouble(this.T/(size(this.zz0,"*"))); - this.model.blocktype = new ScilabString("d"); + this.model.dstate = new ScilabDouble([z0]); + this.model.rpar = new ScilabDouble([this.T/(size(this.zz0,"*"))]); + this.model.blocktype = new ScilabString(["d"]); this.model.firing = [0,-1]; this.model.dep_ut = [true,false]; exprs = [[string(this.nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(this.T)]]; @@ -63,7 +63,7 @@ function DELAYV_f() { if (ok) { graphics.exprs = exprs; this.model.dstate = [[this.zz0.slice()],[told]]; - this.model.rpar = new ScilabDouble(this.T/(size(this.zz0,"*"))); + this.model.rpar = new ScilabDouble([this.T/(size(this.zz0,"*"))]); this.x.graphics = graphics; this.x.model = this.model; break; diff --git a/js/Linear/DERIV.js b/js/Linear/DERIV.js index ba5c9ca6..127b74fa 100644 --- a/js/Linear/DERIV.js +++ b/js/Linear/DERIV.js @@ -2,10 +2,10 @@ function DERIV() { DERIV.prototype.define = function DERIV() { this.model = scicos_model(); - this.model.sim = list(new ScilabString("deriv"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(-1); - this.model.out = new ScilabDouble(-1); - this.model.blocktype = new ScilabString("x"); + this.model.sim = list(new ScilabString(["deriv"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([-1]); + this.model.out = new ScilabDouble([-1]); + this.model.blocktype = new ScilabString(["x"]); this.model.dep_ut = [true,false]; exprs = []; gr_i = []; diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js index 396fa350..cceb973a 100644 --- a/js/Linear/DIFF_c.js +++ b/js/Linear/DIFF_c.js @@ -3,11 +3,11 @@ function DIFF_c() { DIFF_c.prototype.define = function DIFF_c() { this.x0 = [[0],[0]]; this.model = scicos_model(); - this.model.sim = list(new ScilabString("diffblk_c"),new ScilabDouble(10004)); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); + this.model.sim = list(new ScilabString(["diffblk_c"]), new ScilabDouble([10004])); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); this.model.state = this.x0; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]]; gr_i = []; @@ -53,7 +53,7 @@ function DIFF_c() { graphics.exprs = exprs; this.model.state = [[this.x0],[this.xd0]]; this.model.out = [N]; - this.model.in1 = new ScilabDouble(N); + this.model.in1 = new ScilabDouble([N]); this.x.graphics = graphics; this.x.model = this.model; break; diff --git a/js/Linear/DLR.js b/js/Linear/DLR.js index 01f49792..07ba0182 100644 --- a/js/Linear/DLR.js +++ b/js/Linear/DLR.js @@ -8,13 +8,13 @@ function DLR() { D = 0; exprs = [["1"],["1+z"]]; this.model = scicos_model(); - this.model.sim = list(new ScilabString("dsslti4"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.evtin = new ScilabDouble(1); + this.model.sim = list(new ScilabString(["dsslti4"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.evtin = new ScilabDouble([1]); this.model.dstate = x0.slice(); this.model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]]; - this.model.blocktype = new ScilabString("d"); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; gr_i = []; this.x = standard_define([3,2],this.model,exprs,gr_i); diff --git a/js/Linear/DLR_f.js b/js/Linear/DLR_f.js index 0a48dc93..bf9af7b1 100644 --- a/js/Linear/DLR_f.js +++ b/js/Linear/DLR_f.js @@ -8,13 +8,13 @@ function DLR_f() { D = 0; exprs = [["1"],["1+z"]]; this.model = scicos_model(); - this.model.sim = new ScilabString("dsslti"); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.evtin = new ScilabDouble(1); + this.model.sim = new ScilabString(["dsslti"]); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.evtin = new ScilabDouble([1]); this.model.dstate = x0.slice(); this.model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]]; - this.model.blocktype = new ScilabString("d"); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; gr_i = []; this.x = standard_define([2.5,2.5],this.model,exprs,gr_i); diff --git a/js/Linear/DLSS.js b/js/Linear/DLSS.js index 9bb137e6..84562fd2 100644 --- a/js/Linear/DLSS.js +++ b/js/Linear/DLSS.js @@ -7,13 +7,13 @@ function DLSS() { this.C = 1; this.D = 0; this.model = scicos_model(); - this.model.sim = list(new ScilabString("dsslti4"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.evtin = new ScilabDouble(1); + this.model.sim = list(new ScilabString(["dsslti4"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.evtin = new ScilabDouble([1]); this.model.dstate = this.x0.slice(); this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]]; - this.model.blocktype = new ScilabString("d"); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]]; gr_i = []; diff --git a/js/Linear/DLSS_f.js b/js/Linear/DLSS_f.js index 29b08e92..aa18f3ee 100644 --- a/js/Linear/DLSS_f.js +++ b/js/Linear/DLSS_f.js @@ -7,13 +7,13 @@ function DLSS_f() { this.C = 1; this.D = 0; this.model = scicos_model(); - this.model.sim = list(new ScilabString("dsslti"),new ScilabDouble(1)); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.evtin = new ScilabDouble(1); + this.model.sim = list(new ScilabString(["dsslti"]), new ScilabDouble([1])); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.evtin = new ScilabDouble([1]); this.model.dstate = this.x0.slice(); this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]]; - this.model.blocktype = new ScilabString("d"); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]]; gr_i = []; diff --git a/js/Linear/DOLLAR.js b/js/Linear/DOLLAR.js index 3962490d..34525b0f 100644 --- a/js/Linear/DOLLAR.js +++ b/js/Linear/DOLLAR.js @@ -6,12 +6,12 @@ function DOLLAR() { in1 = 1; exprs = string([[z],[this.inh]]); this.model = scicos_model(); - this.model.sim = list(new ScilabString("dollar4"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(in1); - this.model.out = new ScilabDouble(in1); - this.model.evtin = new ScilabDouble(1-this.inh); - this.model.dstate = new ScilabDouble(z); - this.model.blocktype = new ScilabString("d"); + this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([in1]); + this.model.out = new ScilabDouble([in1]); + this.model.evtin = new ScilabDouble([1-this.inh]); + this.model.dstate = new ScilabDouble([z]); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); @@ -47,15 +47,15 @@ function DOLLAR() { out = []; } in1 = out; - this.model.sim = list(new ScilabString("dollar4_m"),new ScilabDouble(4)); - this.model.odstate = list(new ScilabDouble(this.a)); + this.model.sim = list(new ScilabString(["dollar4_m"]), new ScilabDouble([4])); + this.model.odstate = list(new ScilabDouble([this.a])); this.model.dstate = []; if (this.type[(this.a)==1-1]) { if (isreal(this.a)) { it = 1; ot = 1; if ((size(this.a,1)==1||size(this.a,2)==1)) { - this.model.sim = list(new ScilabString("dollar4"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4])); this.model.dstate = this.a.slice(); this.model.odstate = list(); } diff --git a/js/Linear/DOLLAR_f.js b/js/Linear/DOLLAR_f.js index 806e701e..0207d703 100644 --- a/js/Linear/DOLLAR_f.js +++ b/js/Linear/DOLLAR_f.js @@ -6,12 +6,12 @@ function DOLLAR_f() { in1 = 1; exprs = string([[z],[this.inh]]); this.model = scicos_model(); - this.model.sim = new ScilabString("dollar"); - this.model.in1 = new ScilabDouble(in1); - this.model.out = new ScilabDouble(in1); - this.model.evtin = new ScilabDouble(1-this.inh); - this.model.dstate = new ScilabDouble(z); - this.model.blocktype = new ScilabString("d"); + this.model.sim = new ScilabString(["dollar"]); + this.model.in1 = new ScilabDouble([in1]); + this.model.out = new ScilabDouble([in1]); + this.model.evtin = new ScilabDouble([1-this.inh]); + this.model.dstate = new ScilabDouble([z]); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); @@ -52,7 +52,7 @@ function DOLLAR_f() { } if (ok) { graphics.exprs = exprs; - this.model.dstate = new ScilabDouble(this.a); + this.model.dstate = new ScilabDouble([this.a]); this.model.in1 = in1; this.model.out = out; this.x.graphics = graphics; diff --git a/js/Linear/DOLLAR_m.js b/js/Linear/DOLLAR_m.js index 0e67e2ca..830e4d66 100644 --- a/js/Linear/DOLLAR_m.js +++ b/js/Linear/DOLLAR_m.js @@ -6,12 +6,12 @@ function DOLLAR_m() { in1 = 1; exprs = string([[z],[this.inh]]); this.model = scicos_model(); - this.model.sim = list(new ScilabString("dollar4"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(in1); - this.model.out = new ScilabDouble(in1); - this.model.evtin = new ScilabDouble(1-this.inh); - this.model.dstate = new ScilabDouble(z); - this.model.blocktype = new ScilabString("d"); + this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([in1]); + this.model.out = new ScilabDouble([in1]); + this.model.evtin = new ScilabDouble([1-this.inh]); + this.model.dstate = new ScilabDouble([z]); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); @@ -47,15 +47,15 @@ function DOLLAR_m() { out = []; } in1 = out; - this.model.sim = list(new ScilabString("dollar4_m"),new ScilabDouble(4)); - this.model.odstate = list(new ScilabDouble(this.a)); + this.model.sim = list(new ScilabString(["dollar4_m"]), new ScilabDouble([4])); + this.model.odstate = list(new ScilabDouble([this.a])); this.model.dstate = []; if ((this.type[this.a-1]==1)) { if (isreal(this.a)) { it = 1; ot = 1; if ((size(this.a,1)==1||size(this.a,2)==1)) { - this.model.sim = list(new ScilabString("dollar4"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4])); this.model.dstate = this.a.slice(); this.model.odstate = list(); } diff --git a/js/Linear/GAINBLK.js b/js/Linear/GAINBLK.js index ae4ad2ec..78c6fd28 100644 --- a/js/Linear/GAINBLK.js +++ b/js/Linear/GAINBLK.js @@ -7,13 +7,13 @@ function GAINBLK() { in2 = -2; out2 = -2; this.model = scicos_model(); - this.model.sim = list(new ScilabString("gainblk"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(in1); - this.model.out = new ScilabDouble(out); - this.model.in2 = new ScilabDouble(in2); - this.model.out2 = new ScilabDouble(out2); - this.model.rpar = new ScilabDouble(this.gain); - this.model.blocktype = new ScilabString("c"); + this.model.sim = list(new ScilabString(["gainblk"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([in1]); + this.model.out = new ScilabDouble([out]); + this.model.in2 = new ScilabDouble([in2]); + this.model.out2 = new ScilabDouble([out2]); + 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 = []; @@ -52,7 +52,7 @@ function GAINBLK() { if (isreal(this.gain)) { it = 1; ot = 1; - this.model.sim = list(new ScilabString("gainblk"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk"]), new ScilabDouble([4])); this.model.rpar = this.gain.slice(); this.model.opar = list(); } else { @@ -63,22 +63,22 @@ function GAINBLK() { if ((this.over==0)) { if ((typeof(this.gain)=="int32")) { ot = 3; - this.model.sim = list(new ScilabString("gainblk_i32n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_i32n"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="int16")) { ot = 4; - this.model.sim = list(new ScilabString("gainblk_i16n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_i16n"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="int8")) { ot = 5; - this.model.sim = list(new ScilabString("gainblk_i8n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_i8n"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="uint32")) { ot = 6; - this.model.sim = list(new ScilabString("gainblk_ui32n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_ui32n"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="uint16")) { ot = 7; - this.model.sim = list(new ScilabString("gainblk_ui16n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_ui16n"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="uint8")) { ot = 8; - this.model.sim = list(new ScilabString("gainblk_ui8n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_ui8n"]), new ScilabDouble([4])); } else { message("type is not supported."); ok = false; @@ -86,22 +86,22 @@ function GAINBLK() { } else if ((this.over==1)) { if ((typeof(this.gain)=="int32")) { ot = 3; - this.model.sim = list(new ScilabString("gainblk_i32s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_i32s"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="int16")) { ot = 4; - this.model.sim = list(new ScilabString("gainblk_i16s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_i16s"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="int8")) { ot = 5; - this.model.sim = list(new ScilabString("gainblk_i8s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_i8s"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="uint32")) { ot = 6; - this.model.sim = list(new ScilabString("gainblk_ui32s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_ui32s"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="uint16")) { ot = 7; - this.model.sim = list(new ScilabString("gainblk_ui16s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_ui16s"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="uint8")) { ot = 8; - this.model.sim = list(new ScilabString("gainblk_ui8s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_ui8s"]), new ScilabDouble([4])); } else { message("type is not supported."); ok = false; @@ -109,22 +109,22 @@ function GAINBLK() { } else if ((this.over==2)) { if ((typeof(this.gain)=="int32")) { ot = 3; - this.model.sim = list(new ScilabString("gainblk_i32e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_i32e"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="int16")) { ot = 4; - this.model.sim = list(new ScilabString("gainblk_i16e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_i16e"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="int8")) { ot = 5; - this.model.sim = list(new ScilabString("gainblk_i8e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_i8e"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="uint32")) { ot = 6; - this.model.sim = list(new ScilabString("gainblk_ui32e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_ui32e"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="uint16")) { ot = 7; - this.model.sim = list(new ScilabString("gainblk_ui16e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_ui16e"]), new ScilabDouble([4])); } else if ((typeof(this.gain)=="uint8")) { ot = 8; - this.model.sim = list(new ScilabString("gainblk_ui8e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["gainblk_ui8e"]), new ScilabDouble([4])); } else { message("type is not an integer."); ok = false; diff --git a/js/Linear/GAINBLK_f.js b/js/Linear/GAINBLK_f.js index 78c39c12..8cfbd59e 100644 --- a/js/Linear/GAINBLK_f.js +++ b/js/Linear/GAINBLK_f.js @@ -5,11 +5,11 @@ function GAINBLK_f() { in1 = 1; out = 1; 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.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 = []; diff --git a/js/Linear/GAIN_f.js b/js/Linear/GAIN_f.js index a7ea5848..1245e513 100644 --- a/js/Linear/GAIN_f.js +++ b/js/Linear/GAIN_f.js @@ -5,11 +5,11 @@ function GAIN_f() { in1 = 1; out = 1; 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.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 = []; diff --git a/js/Linear/INTEGRAL.js b/js/Linear/INTEGRAL.js index f5bc3520..89a6d7f5 100644 --- a/js/Linear/INTEGRAL.js +++ b/js/Linear/INTEGRAL.js @@ -5,12 +5,12 @@ function INTEGRAL() { minp = -1; rpar = []; this.model = scicos_model(); - this.model.state = new ScilabDouble(0); - this.model.sim = list(new ScilabString("integral_func"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); + this.model.state = new ScilabDouble([0]); + this.model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); this.model.rpar = rpar; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; exprs = string([[0],[0],[0],[this.maxp],[minp]]); gr_i = []; @@ -71,13 +71,13 @@ function INTEGRAL() { ok = false; } else { rpar = [[this.maxp],[this.lowp]]; - this.model.nzcross = new ScilabDouble(size(this.x0,1)); - this.model.nmode = new ScilabDouble(size(this.x0,1)); + this.model.nzcross = new ScilabDouble([size(this.x0,1)]); + this.model.nmode = new ScilabDouble([size(this.x0,1)]); } } else { rpar = []; - this.model.nzcross = new ScilabDouble(0); - this.model.nmode = new ScilabDouble(0); + this.model.nzcross = new ScilabDouble([0]); + this.model.nmode = new ScilabDouble([0]); } if (ok) { this.model.rpar = rpar; diff --git a/js/Linear/INTEGRAL_f.js b/js/Linear/INTEGRAL_f.js index 55b4d40d..8be55672 100644 --- a/js/Linear/INTEGRAL_f.js +++ b/js/Linear/INTEGRAL_f.js @@ -3,11 +3,11 @@ function INTEGRAL_f() { INTEGRAL_f.prototype.define = function INTEGRAL_f() { this.x0 = 0; this.model = scicos_model(); - this.model.sim = new ScilabString("integr"); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.state = new ScilabDouble(this.x0); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["integr"]); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.state = new ScilabDouble([this.x0]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; exprs = strcat(sci2exp(this.x0)); gr_i = []; @@ -34,7 +34,7 @@ function INTEGRAL_f() { break; } graphics.exprs = exprs; - this.model.state = new ScilabDouble(this.x0); + this.model.state = new ScilabDouble([this.x0]); this.x.graphics = graphics; this.x.model = this.model; break; diff --git a/js/Linear/INTEGRAL_m.js b/js/Linear/INTEGRAL_m.js index 65423493..a0fbcd6d 100644 --- a/js/Linear/INTEGRAL_m.js +++ b/js/Linear/INTEGRAL_m.js @@ -5,14 +5,14 @@ function INTEGRAL_m() { minp = -1; rpar = []; this.model = scicos_model(); - this.model.state = new ScilabDouble(0); - this.model.sim = list(new ScilabString("integral_func"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.in2 = new ScilabDouble(1); - this.model.out2 = new ScilabDouble(1); + this.model.state = new ScilabDouble([0]); + this.model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.in2 = new ScilabDouble([1]); + this.model.out2 = new ScilabDouble([1]); this.model.rpar = rpar; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; exprs = string([[0],[0],[0],[this.maxp],[minp]]); gr_i = []; @@ -75,8 +75,8 @@ function INTEGRAL_m() { ok = false; } else { rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())]]; - this.model.nzcross = new ScilabDouble(size(this.x0,"*")); - this.model.nmode = new ScilabDouble(size(this.x0,"*")); + this.model.nzcross = new ScilabDouble([size(this.x0,"*")]); + this.model.nmode = new ScilabDouble([size(this.x0,"*")]); } } else if ((Datatype==2)) { if (size(this.maxp,"*")==1) { @@ -96,25 +96,25 @@ function INTEGRAL_m() { ok = false; } else { rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())],[imag(this.maxp.slice())],[imag(this.lowp.slice())]]; - this.model.nzcross = new ScilabDouble(2*size(this.x0,"*")); - this.model.nmode = new ScilabDouble(2*size(this.x0,"*")); + this.model.nzcross = new ScilabDouble([2*size(this.x0,"*")]); + this.model.nmode = new ScilabDouble([2*size(this.x0,"*")]); } } } else { rpar = []; - this.model.nzcross = new ScilabDouble(0); - this.model.nmode = new ScilabDouble(0); + this.model.nzcross = new ScilabDouble([0]); + this.model.nmode = new ScilabDouble([0]); } if (ok) { this.model.rpar = rpar; if ((Datatype==1)) { - this.model.state = new ScilabDouble(real(this.x0.slice())); - this.model.sim = list(new ScilabString("integral_func"),new ScilabDouble(4)); + this.model.state = new ScilabDouble([real(this.x0.slice())]); + this.model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4])); it = [[1],[ones(this.reinit,1)]]; ot = 1; } else if ((Datatype==2)) { this.model.state = [[real(this.x0.slice())],[imag(this.x0.slice())]]; - this.model.sim = list(new ScilabString("integralz_func"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["integralz_func"]), new ScilabDouble([4])); it = [[2],[2*ones(this.reinit,1)]]; ot = 2; } else { diff --git a/js/Linear/PID.js b/js/Linear/PID.js index af223f0d..a004f67b 100644 --- a/js/Linear/PID.js +++ b/js/Linear/PID.js @@ -24,17 +24,17 @@ function PID() { scs_m.objs[20-1] = scicos_block(gui="IN_f",graphics=scicos_graphics(orig=[193.97067,193.11733],sz=[20,20],flip=true,theta=0,exprs="1",pin=[],pout=21,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim="input",in1=[],in2=[],intyp=1,out=-1,out2=[],outtyp=-1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list()); scs_m.objs[21-1] = scicos_link(xx=[[213.97067],[233.97067]],yy=[[203.11733],[203.11733]],id="drawlink",thick=[0,0],ct=[1,1],from=[20,1,0],to=[15,1,1]); this.model = scicos_model(); - this.model.sim = new ScilabString("csuper"); - this.model.in1 = new ScilabDouble(-1); - this.model.in2 = new ScilabDouble(-2); - this.model.out = new ScilabDouble(-1); - this.model.out2 = new ScilabDouble(-2); - this.model.intyp = new ScilabDouble(1); - this.model.outtyp = new ScilabDouble(1); - this.model.blocktype = new ScilabString("h"); - this.model.firing = new ScilabBoolean(false); + this.model.sim = new ScilabString(["csuper"]); + this.model.in1 = new ScilabDouble([-1]); + this.model.in2 = new ScilabDouble([-2]); + this.model.out = new ScilabDouble([-1]); + this.model.out2 = new ScilabDouble([-2]); + this.model.intyp = new ScilabDouble([1]); + this.model.outtyp = new ScilabDouble([1]); + this.model.blocktype = new ScilabString(["h"]); + this.model.firing = new ScilabBoolean([false]); this.model.dep_ut = [false,false]; - this.model.rpar = new ScilabDouble(scs_m); + this.model.rpar = new ScilabDouble([scs_m]); gr_i = []; this.x = standard_define([2,2],this.model,[],gr_i); return new BasicBlock(this.x); diff --git a/js/Linear/REGISTER.js b/js/Linear/REGISTER.js index ee8118c3..80852342 100644 --- a/js/Linear/REGISTER.js +++ b/js/Linear/REGISTER.js @@ -3,12 +3,12 @@ function REGISTER() { REGISTER.prototype.define = function REGISTER() { this.z0 = zeros(10,1); this.model = scicos_model(); - this.model.sim = list(new ScilabString("delay4"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.evtin = new ScilabDouble(1); - this.model.dstate = new ScilabDouble(this.z0); - this.model.blocktype = new ScilabString("d"); + this.model.sim = list(new ScilabString(["delay4"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.evtin = new ScilabDouble([1]); + this.model.dstate = new ScilabDouble([this.z0]); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; exprs = strcat(string(this.z0),";"); gr_i = []; @@ -45,34 +45,34 @@ function REGISTER() { ok = false; } if (this.it==1) { - this.model.sim = list(new ScilabString("delay4"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["delay4"]), new ScilabDouble([4])); this.z0 = double(this.z0); - this.model.dstate = new ScilabDouble(this.z0); + this.model.dstate = new ScilabDouble([this.z0]); this.model.odstate = list(); } else { if (this.it==3) { - this.model.sim = list(new ScilabString("delay4_i32"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["delay4_i32"]), new ScilabDouble([4])); this.z0 = int32(this.z0); } else if (this.it==4) { - this.model.sim = list(new ScilabString("delay4_i16"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["delay4_i16"]), new ScilabDouble([4])); this.z0 = int16(this.z0); } else if (this.it==5) { - this.model.sim = list(new ScilabString("delay4_i8"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["delay4_i8"]), new ScilabDouble([4])); this.z0 = int8(this.z0); } else if (this.it==6) { - this.model.sim = list(new ScilabString("delay4_ui32"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["delay4_ui32"]), new ScilabDouble([4])); this.z0 = uint32(this.z0); } else if (this.it==7) { - this.model.sim = list(new ScilabString("delay4_ui16"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["delay4_ui16"]), new ScilabDouble([4])); this.z0 = uint16(this.z0); } else if (this.it==8) { - this.model.sim = list(new ScilabString("delay4_ui8"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["delay4_ui8"]), new ScilabDouble([4])); this.z0 = uint8(this.z0); } else { message("Datatype is not supported"); ok = false; } - this.model.odstate = list(new ScilabDouble(this.z0)); + this.model.odstate = list(new ScilabDouble([this.z0])); this.model.dstate = []; } if (ok) { diff --git a/js/Linear/REGISTER_f.js b/js/Linear/REGISTER_f.js index c4b0e7cc..87ea4883 100644 --- a/js/Linear/REGISTER_f.js +++ b/js/Linear/REGISTER_f.js @@ -3,12 +3,12 @@ function REGISTER_f() { REGISTER_f.prototype.define = function REGISTER_f() { this.z0 = zeros(10,1); this.model = scicos_model(); - this.model.sim = new ScilabString("delay"); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.evtin = new ScilabDouble(1); - this.model.dstate = new ScilabDouble(this.z0); - this.model.blocktype = new ScilabString("d"); + this.model.sim = new ScilabString(["delay"]); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.evtin = new ScilabDouble([1]); + this.model.dstate = new ScilabDouble([this.z0]); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; exprs = strcat(string(this.z0),";"); gr_i = []; @@ -40,7 +40,7 @@ function REGISTER_f() { } if (ok) { graphics.exprs = exprs; - this.model.dstate = new ScilabDouble(this.z0); + this.model.dstate = new ScilabDouble([this.z0]); this.x.graphics = graphics; this.x.model = this.model; break; diff --git a/js/Linear/SAMPHOLD.js b/js/Linear/SAMPHOLD.js index 94a9ecec..f2aff8d1 100644 --- a/js/Linear/SAMPHOLD.js +++ b/js/Linear/SAMPHOLD.js @@ -3,11 +3,11 @@ function SAMPHOLD() { SAMPHOLD.prototype.define = function SAMPHOLD() { in1 = -1; this.model = scicos_model(); - this.model.sim = list(new ScilabString("samphold4"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(-1); - this.model.out = new ScilabDouble(-1); - this.model.evtin = new ScilabDouble(1); - this.model.blocktype = new ScilabString("d"); + this.model.sim = list(new ScilabString(["samphold4"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([-1]); + this.model.out = new ScilabDouble([-1]); + this.model.evtin = new ScilabDouble([1]); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [true,false]; gr_i = []; this.x = standard_define([2,2],this.model," ",gr_i); diff --git a/js/Linear/SAMPHOLD_m.js b/js/Linear/SAMPHOLD_m.js index 87550934..e1d95b25 100644 --- a/js/Linear/SAMPHOLD_m.js +++ b/js/Linear/SAMPHOLD_m.js @@ -2,15 +2,15 @@ function SAMPHOLD_m() { SAMPHOLD_m.prototype.define = function SAMPHOLD_m() { this.model = scicos_model(); - this.model.sim = list(new ScilabString("samphold4_m"),new ScilabDouble(4)); - this.model.in1 = new ScilabDouble(-1); - this.model.in2 = new ScilabDouble(-2); - this.model.intyp = new ScilabDouble(1); - this.model.outtyp = new ScilabDouble(1); - this.model.out = new ScilabDouble(-1); - this.model.out2 = new ScilabDouble(-2); - this.model.evtin = new ScilabDouble(1); - this.model.blocktype = new ScilabString("d"); + this.model.sim = list(new ScilabString(["samphold4_m"]), new ScilabDouble([4])); + this.model.in1 = new ScilabDouble([-1]); + this.model.in2 = new ScilabDouble([-2]); + this.model.intyp = new ScilabDouble([1]); + this.model.outtyp = new ScilabDouble([1]); + this.model.out = new ScilabDouble([-1]); + this.model.out2 = new ScilabDouble([-2]); + this.model.evtin = new ScilabDouble([1]); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [true,false]; label = [sci2exp(1)]; gr_i = []; diff --git a/js/Linear/SAMPLEHOLD_f.js b/js/Linear/SAMPLEHOLD_f.js index 31ac840d..35768a23 100644 --- a/js/Linear/SAMPLEHOLD_f.js +++ b/js/Linear/SAMPLEHOLD_f.js @@ -3,11 +3,11 @@ function SAMPLEHOLD_f() { SAMPLEHOLD_f.prototype.define = function SAMPLEHOLD_f() { in1 = -1; this.model = scicos_model(); - this.model.sim = new ScilabString("samphold"); - this.model.in1 = new ScilabDouble(-1); - this.model.out = new ScilabDouble(-1); - this.model.evtin = new ScilabDouble(1); - this.model.blocktype = new ScilabString("d"); + this.model.sim = new ScilabString(["samphold"]); + this.model.in1 = new ScilabDouble([-1]); + this.model.out = new ScilabDouble([-1]); + this.model.evtin = new ScilabDouble([1]); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [true,false]; gr_i = []; this.x = standard_define([2,2],this.model," ",gr_i); diff --git a/js/Linear/SOM_f.js b/js/Linear/SOM_f.js index 5c068e3e..c6886bcc 100644 --- a/js/Linear/SOM_f.js +++ b/js/Linear/SOM_f.js @@ -3,11 +3,11 @@ function SOM_f() { SOM_f.prototype.define = function SOM_f() { sgn = [[1],[1],[1]]; this.model = scicos_model(); - this.model.sim = list(new ScilabString("sum"),new ScilabDouble(2)); + this.model.sim = list(new ScilabString(["sum"]), new ScilabDouble([2])); this.model.in1 = [[-1],[-1],[-1]]; - this.model.out = new ScilabDouble(-1); + this.model.out = new ScilabDouble([-1]); this.model.rpar = sgn; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; exprs = [[sci2exp(1)],[sci2exp(sgn)]]; gr_i = []; diff --git a/js/Linear/SUMMATION.js b/js/Linear/SUMMATION.js index 996168f6..279d1bfb 100644 --- a/js/Linear/SUMMATION.js +++ b/js/Linear/SUMMATION.js @@ -3,13 +3,13 @@ function SUMMATION() { SUMMATION.prototype.define = function SUMMATION() { this.sgn = [[1],[-1]]; this.model = scicos_model(); - this.model.sim = list(new ScilabString("summation"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation"]), new ScilabDouble([4])); this.model.in1 = [[-1],[-1]]; - this.model.out = new ScilabDouble(-1); + this.model.out = new ScilabDouble([-1]); this.model.in2 = [[-2],[-2]]; - this.model.out2 = new ScilabDouble(-2); + this.model.out2 = new ScilabDouble([-2]); this.model.ipar = this.sgn; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; exprs = sci2exp(this.sgn); gr_i = []; @@ -81,54 +81,54 @@ function SUMMATION() { it = this.Datatype*ones(1,size(in1,1)); ot = this.Datatype; if (this.Datatype==1) { - this.model.sim = list(new ScilabString("summation"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation"]), new ScilabDouble([4])); } else if (this.Datatype==2) { - this.model.sim = list(new ScilabString("summation_z"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_z"]), new ScilabDouble([4])); } else if (((this.Datatype<1)||(this.Datatype>8))) { message("Datatype is not supported"); ok = false; } else { if (this.satur==0) { if (this.Datatype==3) { - this.model.sim = list(new ScilabString("summation_i32n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_i32n"]), new ScilabDouble([4])); } else if (this.Datatype==4) { - this.model.sim = list(new ScilabString("summation_i16n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_i16n"]), new ScilabDouble([4])); } else if (this.Datatype==5) { - this.model.sim = list(new ScilabString("summation_i8n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_i8n"]), new ScilabDouble([4])); } else if (this.Datatype==6) { - this.model.sim = list(new ScilabString("summation_ui32n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_ui32n"]), new ScilabDouble([4])); } else if (this.Datatype==7) { - this.model.sim = list(new ScilabString("summation_ui16n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_ui16n"]), new ScilabDouble([4])); } else if (this.Datatype==8) { - this.model.sim = list(new ScilabString("summation_ui8n"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_ui8n"]), new ScilabDouble([4])); } } else if (this.satur==1) { if (this.Datatype==3) { - this.model.sim = list(new ScilabString("summation_i32s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_i32s"]), new ScilabDouble([4])); } else if (this.Datatype==4) { - this.model.sim = list(new ScilabString("summation_i16s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_i16s"]), new ScilabDouble([4])); } else if (this.Datatype==5) { - this.model.sim = list(new ScilabString("summation_i8s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_i8s"]), new ScilabDouble([4])); } else if (this.Datatype==6) { - this.model.sim = list(new ScilabString("summation_ui32s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_ui32s"]), new ScilabDouble([4])); } else if (this.Datatype==7) { - this.model.sim = list(new ScilabString("summation_ui16s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_ui16s"]), new ScilabDouble([4])); } else if (this.Datatype==8) { - this.model.sim = list(new ScilabString("summation_ui8s"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_ui8s"]), new ScilabDouble([4])); } } else if (this.satur==2) { if (this.Datatype==3) { - this.model.sim = list(new ScilabString("summation_i32e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_i32e"]), new ScilabDouble([4])); } else if (this.Datatype==4) { - this.model.sim = list(new ScilabString("summation_i16e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_i16e"]), new ScilabDouble([4])); } else if (this.Datatype==5) { - this.model.sim = list(new ScilabString("summation_i8e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_i8e"]), new ScilabDouble([4])); } else if (this.Datatype==6) { - this.model.sim = list(new ScilabString("summation_ui32e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_ui32e"]), new ScilabDouble([4])); } else if (this.Datatype==7) { - this.model.sim = list(new ScilabString("summation_ui16e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_ui16e"]), new ScilabDouble([4])); } else if (this.Datatype==8) { - this.model.sim = list(new ScilabString("summation_ui8e"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["summation_ui8e"]), new ScilabDouble([4])); } } } @@ -136,8 +136,8 @@ function SUMMATION() { [model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],it),list([nout,nout2],ot),[],[]); } if (ok) { - this.model.rpar = new ScilabDouble(this.satur); - this.model.ipar = new ScilabDouble(this.sgn); + this.model.rpar = new ScilabDouble([this.satur]); + this.model.ipar = new ScilabDouble([this.sgn]); graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = this.model; diff --git a/js/Linear/SUM_f.js b/js/Linear/SUM_f.js index ab5e7e3b..70d6662f 100644 --- a/js/Linear/SUM_f.js +++ b/js/Linear/SUM_f.js @@ -2,10 +2,10 @@ function SUM_f() { SUM_f.prototype.define = function SUM_f() { this.model = scicos_model(); - this.model.sim = list(new ScilabString("plusblk"),new ScilabDouble(2)); + this.model.sim = list(new ScilabString(["plusblk"]), new ScilabDouble([2])); this.model.in1 = [[-1],[-1],[-1]]; - this.model.out = new ScilabDouble(-1); - this.model.blocktype = new ScilabString("c"); + this.model.out = new ScilabDouble([-1]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; gr_i = []; exprs = []; diff --git a/js/Linear/TCLSS.js b/js/Linear/TCLSS.js index a4929c9c..a6a16813 100644 --- a/js/Linear/TCLSS.js +++ b/js/Linear/TCLSS.js @@ -10,13 +10,13 @@ function TCLSS() { nx = size(this.x0,"*"); out = 1; this.model = scicos_model(); - this.model.sim = list(new ScilabString("tcslti4"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["tcslti4"]), new ScilabDouble([4])); this.model.in1 = [[in1],[nx]]; - this.model.out = new ScilabDouble(out); - this.model.evtin = new ScilabDouble(1); - this.model.state = new ScilabDouble(this.x0); + this.model.out = new ScilabDouble([out]); + this.model.evtin = new ScilabDouble([1]); + this.model.state = new ScilabDouble([this.x0]); this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]]; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]]; gr_i = []; @@ -85,9 +85,9 @@ function TCLSS() { this.model.state = this.x0.slice(); this.model.rpar = rpar; if (this.D!=[]) { - this.model.sim = list(new ScilabString("tcslti4"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["tcslti4"]), new ScilabDouble([4])); } else { - this.model.sim = list(new ScilabString("tcsltj4"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["tcsltj4"]), new ScilabDouble([4])); } this.x.graphics = graphics; this.x.model = this.model; diff --git a/js/Linear/TCLSS_f.js b/js/Linear/TCLSS_f.js index f040dc61..83b72024 100644 --- a/js/Linear/TCLSS_f.js +++ b/js/Linear/TCLSS_f.js @@ -10,13 +10,13 @@ function TCLSS_f() { nx = size(this.x0,"*"); out = 1; this.model = scicos_model(); - this.model.sim = list(new ScilabString("tcslti"),new ScilabDouble(1)); + this.model.sim = list(new ScilabString(["tcslti"]), new ScilabDouble([1])); this.model.in1 = [[in1],[nx]]; - this.model.out = new ScilabDouble(out); - this.model.evtin = new ScilabDouble(1); - this.model.state = new ScilabDouble(this.x0); + this.model.out = new ScilabDouble([out]); + this.model.evtin = new ScilabDouble([1]); + this.model.state = new ScilabDouble([this.x0]); this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]]; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]]; gr_i = []; @@ -85,9 +85,9 @@ function TCLSS_f() { this.model.state = this.x0.slice(); this.model.rpar = rpar; if (this.D!=[]) { - this.model.sim = list(new ScilabString("tcslti"),new ScilabDouble(1)); + this.model.sim = list(new ScilabString(["tcslti"]), new ScilabDouble([1])); } else { - this.model.sim = list(new ScilabString("tcsltj"),new ScilabDouble(1)); + this.model.sim = list(new ScilabString(["tcsltj"]), new ScilabDouble([1])); } this.x.graphics = graphics; this.x.model = this.model; diff --git a/js/Linear/TIME_DELAY.js b/js/Linear/TIME_DELAY.js index 963504ab..657102ad 100644 --- a/js/Linear/TIME_DELAY.js +++ b/js/Linear/TIME_DELAY.js @@ -6,12 +6,12 @@ function TIME_DELAY() { this.init = 0; this.N = 1024; this.model = scicos_model(); - this.model.sim = list(new ScilabString("time_delay"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["time_delay"]), new ScilabDouble([4])); this.model.in1 = [nin]; - this.model.out = new ScilabDouble(nin); + this.model.out = new ScilabDouble([nin]); this.model.rpar = [this.T,this.init]; - this.model.ipar = new ScilabDouble(this.N); - this.model.blocktype = new ScilabString("x"); + this.model.ipar = new ScilabDouble([this.N]); + this.model.blocktype = new ScilabString(["x"]); this.model.dep_ut = [false,true]; exprs = [[string(this.T)],[string(this.init)],[string(this.N)]]; gr_i = []; @@ -57,7 +57,7 @@ function TIME_DELAY() { if (ok) { graphics.exprs = exprs; this.model.rpar = [[this.T],[this.init]]; - this.model.ipar = new ScilabDouble(this.N); + this.model.ipar = new ScilabDouble([this.N]); this.model.dep_ut = [false,true]; this.x.graphics = graphics; this.x.model = this.model; diff --git a/js/Linear/VARIABLE_DELAY.js b/js/Linear/VARIABLE_DELAY.js index 50216a5b..1c1c4a10 100644 --- a/js/Linear/VARIABLE_DELAY.js +++ b/js/Linear/VARIABLE_DELAY.js @@ -6,12 +6,12 @@ function VARIABLE_DELAY() { this.init = 0; this.N = 1024; this.model = scicos_model(); - this.model.sim = list(new ScilabString("variable_delay"),new ScilabDouble(4)); + this.model.sim = list(new ScilabString(["variable_delay"]), new ScilabDouble([4])); this.model.in1 = [[nin],[1]]; - this.model.out = new ScilabDouble(nin); + this.model.out = new ScilabDouble([nin]); this.model.rpar = [this.T,this.init]; - this.model.ipar = new ScilabDouble(this.N); - this.model.blocktype = new ScilabString("d"); + this.model.ipar = new ScilabDouble([this.N]); + this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; exprs = [[string(this.T)],[string(this.init)],[string(this.N)]]; gr_i = []; @@ -57,7 +57,7 @@ function VARIABLE_DELAY() { if (ok) { graphics.exprs = exprs; this.model.rpar = [[this.T],[this.init]]; - this.model.ipar = new ScilabDouble(this.N); + this.model.ipar = new ScilabDouble([this.N]); this.x.graphics = graphics; this.x.model = this.model; break; |