diff options
Diffstat (limited to 'js/NonLinear')
-rw-r--r-- | js/NonLinear/ABS_VALUE.js | 6 | ||||
-rw-r--r-- | js/NonLinear/DLRADAPT_f.js | 16 | ||||
-rw-r--r-- | js/NonLinear/EXPBLK_f.js | 6 | ||||
-rw-r--r-- | js/NonLinear/EXPBLK_m.js | 6 | ||||
-rw-r--r-- | js/NonLinear/INTRP2BLK_f.js | 10 | ||||
-rw-r--r-- | js/NonLinear/INTRPLBLK_f.js | 8 | ||||
-rw-r--r-- | js/NonLinear/LOGBLK_f.js | 6 | ||||
-rw-r--r-- | js/NonLinear/LOOKUP2D.js | 14 | ||||
-rw-r--r-- | js/NonLinear/LOOKUP_c.js | 14 | ||||
-rw-r--r-- | js/NonLinear/MAXMIN.js | 10 | ||||
-rw-r--r-- | js/NonLinear/POWBLK_f.js | 6 | ||||
-rw-r--r-- | js/NonLinear/PRODUCT.js | 6 | ||||
-rw-r--r-- | js/NonLinear/QUANT_f.js | 8 | ||||
-rw-r--r-- | js/NonLinear/SATURATION.js | 10 | ||||
-rw-r--r-- | js/NonLinear/SAT_f.js | 10 | ||||
-rw-r--r-- | js/NonLinear/SIGNUM.js | 6 | ||||
-rw-r--r-- | js/NonLinear/TrigFun.js | 6 |
17 files changed, 74 insertions, 74 deletions
diff --git a/js/NonLinear/ABS_VALUE.js b/js/NonLinear/ABS_VALUE.js index 5b092794..5c794d4a 100644 --- a/js/NonLinear/ABS_VALUE.js +++ b/js/NonLinear/ABS_VALUE.js @@ -25,11 +25,11 @@ function ABS_VALUE() { return options; } ABS_VALUE.prototype.set = function ABS_VALUE() { - this.zcr = arguments[0]["zcr"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.zcr,this.exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),this.exprs); + var ok = true; + this.zcr = arguments[0]["zcr"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/DLRADAPT_f.js b/js/NonLinear/DLRADAPT_f.js index b3840590..c32ec428 100644 --- a/js/NonLinear/DLRADAPT_f.js +++ b/js/NonLinear/DLRADAPT_f.js @@ -38,16 +38,16 @@ function DLRADAPT_f() { return options; } DLRADAPT_f.prototype.set = function DLRADAPT_f() { - this.p = inverse(arguments[0]["p"]) - this.rn = inverse(arguments[0]["rn"]) - this.rd = inverse(arguments[0]["rd"]) - this.g = inverse(arguments[0]["g"]) - this.last_u = inverse(arguments[0]["last_u"]) - this.last_y = inverse(arguments[0]["last_y"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.p,this.rn,this.rd,this.g,this.last_u,this.last_y,this.exprs] = scicos_getvalue("Set block parameters",["Vector of p mesh points","Numerator roots (one line for each mesh)","Denominator roots (one line for each mesh)","Vector of gain at mesh points","past inputs (Num degree values)","past outputs (Den degree values)"],list("vec",-1,"mat",[-1,-1],"mat",["size(%1,\'*\')","-1"],"vec","size(%1,\'*\')","vec","size(%2,2)","vec","size(%3,2)"),this.exprs); + var ok = true; + this.p = inverse(arguments[0]["p"]); + this.rn = inverse(arguments[0]["rn"]); + this.rd = inverse(arguments[0]["rd"]); + this.g = inverse(arguments[0]["g"]); + this.last_u = inverse(arguments[0]["last_u"]); + this.last_y = inverse(arguments[0]["last_y"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/EXPBLK_f.js b/js/NonLinear/EXPBLK_f.js index 707d8fd1..bbc0b82d 100644 --- a/js/NonLinear/EXPBLK_f.js +++ b/js/NonLinear/EXPBLK_f.js @@ -24,14 +24,14 @@ function EXPBLK_f() { return options; } EXPBLK_f.prototype.set = function EXPBLK_f() { - this.a = parseFloat(arguments[0]["a"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.a,this.exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),this.exprs); + var ok = true; + this.a = parseFloat(arguments[0]["a"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/NonLinear/EXPBLK_m.js b/js/NonLinear/EXPBLK_m.js index ddef6624..c77f7bea 100644 --- a/js/NonLinear/EXPBLK_m.js +++ b/js/NonLinear/EXPBLK_m.js @@ -28,14 +28,14 @@ function EXPBLK_m() { return options; } EXPBLK_m.prototype.set = function EXPBLK_m() { - this.a = parseFloat(arguments[0]["a"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.a,this.exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),this.exprs); + var ok = true; + this.a = parseFloat(arguments[0]["a"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/NonLinear/INTRP2BLK_f.js b/js/NonLinear/INTRP2BLK_f.js index 303cdffb..4dee61c9 100644 --- a/js/NonLinear/INTRP2BLK_f.js +++ b/js/NonLinear/INTRP2BLK_f.js @@ -29,13 +29,13 @@ function INTRP2BLK_f() { return options; } INTRP2BLK_f.prototype.set = function INTRP2BLK_f() { - this.a = inverse(arguments[0]["a"]) - this.b = inverse(arguments[0]["b"]) - this.c = inverse(arguments[0]["c"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.a,this.b,this.c,this.exprs] = scicos_getvalue("Set Interpolation block parameters",["X coord.","Y coord.","Z values"],list("vec",-1,"vec",-1,"mat",[-1,-1]),this.exprs); + var ok = true; + this.a = inverse(arguments[0]["a"]); + this.b = inverse(arguments[0]["b"]); + this.c = inverse(arguments[0]["c"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/INTRPLBLK_f.js b/js/NonLinear/INTRPLBLK_f.js index 64077254..8a55302f 100644 --- a/js/NonLinear/INTRPLBLK_f.js +++ b/js/NonLinear/INTRPLBLK_f.js @@ -26,12 +26,12 @@ function INTRPLBLK_f() { return options; } INTRPLBLK_f.prototype.set = function INTRPLBLK_f() { - this.a = inverse(arguments[0]["a"]) - this.b = inverse(arguments[0]["b"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.a,this.b,this.exprs] = scicos_getvalue("Set Interpolation block parameters",["X coord.","Y coord."],list("vec",-1,"vec",-1),this.exprs); + var ok = true; + this.a = inverse(arguments[0]["a"]); + this.b = inverse(arguments[0]["b"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/LOGBLK_f.js b/js/NonLinear/LOGBLK_f.js index 3b97fb56..f244195f 100644 --- a/js/NonLinear/LOGBLK_f.js +++ b/js/NonLinear/LOGBLK_f.js @@ -24,14 +24,14 @@ function LOGBLK_f() { return options; } LOGBLK_f.prototype.set = function LOGBLK_f() { - this.a = parseFloat(arguments[0]["a"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.a,this.exprs] = scicos_getvalue("Set log block parameters","Basis (>1)",list("vec",1),this.exprs); + var ok = true; + this.a = parseFloat(arguments[0]["a"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/NonLinear/LOOKUP2D.js b/js/NonLinear/LOOKUP2D.js index a733a55b..bca63302 100644 --- a/js/NonLinear/LOOKUP2D.js +++ b/js/NonLinear/LOOKUP2D.js @@ -35,18 +35,18 @@ function LOOKUP2D() { return options; } LOOKUP2D.prototype.set = function LOOKUP2D() { - this.xx = inverse(arguments[0]["xx"]) - this.yy = inverse(arguments[0]["yy"]) - this.zz = inverse(arguments[0]["zz"]) - this.Method = parseFloat(arguments[0]["Method"]) - this.graf = arguments[0]["graf"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var ok = false; var SaveExit = false; while (true) { var Ask_again = false; - [ok,this.xx,this.yy,this.zz,this.Method,this.graf,this.exprs] = scicos_getvalue("2D Lookup table parameters",["Row index input values","Column index input values","Table data","Lookup method(1..5)","Launch graphic window(y/n)?"],list("vec",-1,"vec",-1,"mat",[-1,-1],"vec",1,"str",1),this.exprs); + var ok = true; + this.xx = inverse(arguments[0]["xx"]); + this.yy = inverse(arguments[0]["yy"]); + this.zz = inverse(arguments[0]["zz"]); + this.Method = parseFloat(arguments[0]["Method"]); + this.graf = arguments[0]["graf"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/LOOKUP_c.js b/js/NonLinear/LOOKUP_c.js index 9666b1c6..bcc1e3e1 100644 --- a/js/NonLinear/LOOKUP_c.js +++ b/js/NonLinear/LOOKUP_c.js @@ -40,18 +40,18 @@ function LOOKUP_c() { return options; } LOOKUP_c.prototype.set = function LOOKUP_c() { - this.Method = parseFloat(arguments[0]["Method"]) - this.xx = inverse(arguments[0]["xx"]) - this.yy = inverse(arguments[0]["yy"]) - this.extrapo = parseFloat(arguments[0]["extrapo"]) - this.graf = arguments[0]["graf"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var ok = false; var SaveExit = false; while (true) { var Ask_again = false; - [ok,this.Method,this.xx,this.yy,this.extrapo,this.graf,this.exprs] = scicos_getvalue("Lookup table parameters",["Spline Interpolation method (0..9)","x","y","Extrapolate method (0,1)","Launch graphic window(y/n)?"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"str",1),this.exprs); + var ok = true; + this.Method = parseFloat(arguments[0]["Method"]); + this.xx = inverse(arguments[0]["xx"]); + this.yy = inverse(arguments[0]["yy"]); + this.extrapo = parseFloat(arguments[0]["extrapo"]); + this.graf = arguments[0]["graf"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/MAXMIN.js b/js/NonLinear/MAXMIN.js index d0c04381..4e065441 100644 --- a/js/NonLinear/MAXMIN.js +++ b/js/NonLinear/MAXMIN.js @@ -26,13 +26,13 @@ function MAXMIN() { return options; } MAXMIN.prototype.set = function MAXMIN() { - this.mm = parseFloat(arguments[0]["mm"]) - this.nin = arguments[0]["nin"] - this.zcr = parseFloat(arguments[0]["zcr"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.mm,this.nin,this.zcr,this.exprs] = scicos_getvalue("Set Max/Min block parameters",["Min (1) or Max (2) ","Number of input vectors (1 or 2)","zero-crossing (1: yes, 0;no)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.mm = parseFloat(arguments[0]["mm"]); + this.nin = arguments[0]["nin"]; + this.zcr = parseFloat(arguments[0]["zcr"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/POWBLK_f.js b/js/NonLinear/POWBLK_f.js index a6d2b383..bd307438 100644 --- a/js/NonLinear/POWBLK_f.js +++ b/js/NonLinear/POWBLK_f.js @@ -24,14 +24,14 @@ function POWBLK_f() { return options; } POWBLK_f.prototype.set = function POWBLK_f() { - this.a = parseFloat(arguments[0]["a"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.a,this.exprs] = scicos_getvalue("Set u^a block parameters","to the power of",list("vec",1),this.exprs); + var ok = true; + this.a = parseFloat(arguments[0]["a"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/NonLinear/PRODUCT.js b/js/NonLinear/PRODUCT.js index ea3fb92f..bbaef310 100644 --- a/js/NonLinear/PRODUCT.js +++ b/js/NonLinear/PRODUCT.js @@ -23,11 +23,11 @@ function PRODUCT() { return options; } PRODUCT.prototype.set = function PRODUCT() { - this.sgn = inverse(arguments[0]["sgn"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.sgn,this.exprs] = scicos_getvalue([[" Set multiplication block parameters"],["(multiplication is set with + 1, division with -1)"],[""]],"Number of inputs or sign vector",list("vec",-1),this.exprs); + var ok = true; + this.sgn = inverse(arguments[0]["sgn"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/QUANT_f.js b/js/NonLinear/QUANT_f.js index b2642a10..80ff7500 100644 --- a/js/NonLinear/QUANT_f.js +++ b/js/NonLinear/QUANT_f.js @@ -27,12 +27,12 @@ function QUANT_f() { return options; } QUANT_f.prototype.set = function QUANT_f() { - this.pas = parseFloat(arguments[0]["pas"]) - this.meth = parseFloat(arguments[0]["meth"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.pas,this.meth,this.exprs] = scicos_getvalue("Set parameters",["Step","Quantization Type (1-4)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.pas = parseFloat(arguments[0]["pas"]); + this.meth = parseFloat(arguments[0]["meth"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/SATURATION.js b/js/NonLinear/SATURATION.js index c53f10ec..e3db86fe 100644 --- a/js/NonLinear/SATURATION.js +++ b/js/NonLinear/SATURATION.js @@ -30,13 +30,13 @@ function SATURATION() { return options; } SATURATION.prototype.set = function SATURATION() { - this.maxp = parseFloat(arguments[0]["maxp"]) - this.minp = parseFloat(arguments[0]["minp"]) - this.zeroc = arguments[0]["zeroc"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.maxp,this.minp,this.zeroc,this.exprs] = scicos_getvalue("Set Saturation parameters",["Upper limit","Lower limit","zero crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.maxp = parseFloat(arguments[0]["maxp"]); + this.minp = parseFloat(arguments[0]["minp"]); + this.zeroc = arguments[0]["zeroc"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/SAT_f.js b/js/NonLinear/SAT_f.js index 06eaa83f..32c358af 100644 --- a/js/NonLinear/SAT_f.js +++ b/js/NonLinear/SAT_f.js @@ -30,13 +30,13 @@ function SAT_f() { return options; } SAT_f.prototype.set = function SAT_f() { - this.minp = parseFloat(arguments[0]["minp"]) - this.maxp = parseFloat(arguments[0]["maxp"]) - this.pente = arguments[0]["pente"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.minp,this.maxp,this.pente,this.exprs] = scicos_getvalue("Set Saturation parameters",["Min","Max","Slope"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.minp = parseFloat(arguments[0]["minp"]); + this.maxp = parseFloat(arguments[0]["maxp"]); + this.pente = arguments[0]["pente"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/SIGNUM.js b/js/NonLinear/SIGNUM.js index 075f4c92..1e929997 100644 --- a/js/NonLinear/SIGNUM.js +++ b/js/NonLinear/SIGNUM.js @@ -25,11 +25,11 @@ function SIGNUM() { return options; } SIGNUM.prototype.set = function SIGNUM() { - this.zcr = arguments[0]["zcr"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.zcr,this.exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),this.exprs); + var ok = true; + this.zcr = arguments[0]["zcr"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/TrigFun.js b/js/NonLinear/TrigFun.js index a3857b52..78f23521 100644 --- a/js/NonLinear/TrigFun.js +++ b/js/NonLinear/TrigFun.js @@ -21,13 +21,13 @@ function TrigFun() { return options; } TrigFun.prototype.set = function TrigFun() { - this.fun = arguments[0]["fun"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var PREVAR_FF = [["sin"],["cos"],["tan"],["asin"],["acos"],["atan"],["sinh"],["cosh"],["tanh"],["asinh"],["acosh"],["atanh"]]; var PREVAR_GG = [["Choose among "+strcat(PREVAR_FF.slice(1-1,4),", ")],[strcat(PREVAR_FF.slice(5-1,$),", ")]]; while (true) { - [ok,this.fun,this.exprs] = scicos_getvalue(PREVAR_GG,"Function",list("str",1),this.exprs); + var ok = true; + this.fun = arguments[0]["fun"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } |