diff options
author | Sunil Shetye | 2018-06-26 14:59:47 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-26 14:59:47 +0530 |
commit | eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 (patch) | |
tree | 6378935263fe5cafd389b6893ac3b37a1dd4b1a7 /js/NonLinear/INTRPLBLK_f.js | |
parent | afed64f1a0eab0b2d742088186d7bc340a2c895b (diff) | |
download | sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.gz sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.bz2 sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.zip |
add return value from scicos_getvalue to global vars
Diffstat (limited to 'js/NonLinear/INTRPLBLK_f.js')
-rw-r--r-- | js/NonLinear/INTRPLBLK_f.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/NonLinear/INTRPLBLK_f.js b/js/NonLinear/INTRPLBLK_f.js index 28ce39b3..978d3aa1 100644 --- a/js/NonLinear/INTRPLBLK_f.js +++ b/js/NonLinear/INTRPLBLK_f.js @@ -1,16 +1,16 @@ /* autogenerated from "macros/NonLinear/INTRPLBLK_f.sci" */ function INTRPLBLK_f() { INTRPLBLK_f.prototype.define = function INTRPLBLK_f() { - a = [[0],[1]]; - b = [[0],[1]]; + this.a = [[0],[1]]; + this.b = [[0],[1]]; model = scicos_model(); model.sim = "intrpl"; model.in1 = 1; model.out = 1; - model.rpar = [[a],[b]]; + model.rpar = [[this.a],[this.b]]; model.blocktype = "c"; model.dep_ut = [true,false]; - exprs = [[strcat(sci2exp(a))],[strcat(sci2exp(b))]]; + exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))]]; gr_i = []; this.x = standard_define([2,2],model,exprs,gr_i); return new BasicBlock(this.x); @@ -26,18 +26,18 @@ function INTRPLBLK_f() { exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,a,b,exprs] = scicos_getvalue("Set Interpolation block parameters",[["X coord."],["Y coord."]],list("vec",-1,"vec",-1),exprs); + [ok,this.a,this.b,exprs] = scicos_getvalue("Set Interpolation block parameters",[["X coord."],["Y coord."]],list("vec",-1,"vec",-1),exprs); if (!ok) { break; } - if (size(a,"*")!=size(b,"*")) { + if (size(this.a,"*")!=size(this.b,"*")) { message("X and Y must have the same size"); - } else if (min(a.slice(2-1,$)-a.slice(1-1,$-1))<=0) { + } else if (min(this.a.slice(2-1,$)-this.a.slice(1-1,$-1))<=0) { message("X must be strictly increasing"); } else { if (ok) { graphics.exprs = exprs; - model.rpar = [[a.slice()],[b.slice()]]; + model.rpar = [[this.a.slice()],[this.b.slice()]]; this.x.graphics = graphics; this.x.model = model; break; |