From eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Tue, 26 Jun 2018 14:59:47 +0530 Subject: add return value from scicos_getvalue to global vars --- js/Linear/DIFF_c.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'js/Linear/DIFF_c.js') diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js index 42abb23c..c8cd5202 100644 --- a/js/Linear/DIFF_c.js +++ b/js/Linear/DIFF_c.js @@ -1,15 +1,15 @@ /* autogenerated from "macros/Linear/DIFF_c.sci" */ function DIFF_c() { DIFF_c.prototype.define = function DIFF_c() { - x0 = [[0],[0]]; + this.x0 = [[0],[0]]; model = scicos_model(); model.sim = list("diffblk_c",10004); model.in1 = 1; model.out = 1; - model.state = x0; + model.state = this.x0; model.blocktype = "c"; model.dep_ut = [false,true]; - exprs = [[strcat(sci2exp(x0[1-1]))],[strcat(sci2exp(x0[2-1]))]]; + exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]]; gr_i = []; this.x = standard_define([2,2],model,exprs,gr_i); return new BasicBlock(this.x); @@ -26,14 +26,14 @@ function DIFF_c() { model = arg1.model; while (true) { ask_again = false; - [ok,x0,xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["Initial state"],["Initial Derivative"]],list("vec",-1,"vec",-1),exprs); + [ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["Initial state"],["Initial Derivative"]],list("vec",-1,"vec",-1),exprs); if (!ok) { break; } - x0 = x0.slice(); - N = size(x0,"*"); - xd0 = xd0.slice(); - Nxd = size(xd0,"*"); + this.x0 = this.x0.slice(); + N = size(this.x0,"*"); + this.xd0 = this.xd0.slice(); + Nxd = size(this.xd0,"*"); if ((N!=Nxd)) { message("Incompatible sizes: states and their derivatives should have the same size "); ask_again = true; @@ -44,7 +44,7 @@ function DIFF_c() { } if (!ask_again) { graphics.exprs = exprs; - model.state = [[x0],[xd0]]; + model.state = [[this.x0],[this.xd0]]; model.out = [N]; model.in1 = N; this.x.graphics = graphics; -- cgit