From 7465daea85285ba7f291b6bf6ddc45caa9e7ad65 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Mon, 25 Jun 2018 18:20:39 +0530 Subject: add spacing to end of block also --- js/Linear/INTEGRAL_m.js | 187 ++++++++++++++++++++++++------------------------ 1 file changed, 94 insertions(+), 93 deletions(-) (limited to 'js/Linear/INTEGRAL_m.js') diff --git a/js/Linear/INTEGRAL_m.js b/js/Linear/INTEGRAL_m.js index 733d18f2..f5e0b140 100644 --- a/js/Linear/INTEGRAL_m.js +++ b/js/Linear/INTEGRAL_m.js @@ -16,108 +16,109 @@ function INTEGRAL_m() { model.dep_ut = [false,true]; exprs = string([[0],[0],[0],[maxp],[minp]]); gr_i = []; - x = standard_define([2,2],model,exprs,gr_i); + this.x = standard_define([2,2],model,exprs,gr_i); } INTEGRAL_m.prototype.details = function INTEGRAL_m() { + return this.x; } INTEGRAL_m.prototype.get = function INTEGRAL_m() { } INTEGRAL_m.prototype.set = function INTEGRAL_m() { - x = arg1; + this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,x0,reinit,satur,maxp,lowp,exprs] = scicos_getvalue("Set Integral block parameters",[["Initial Condition"],["With re-intialization (1:yes, 0:no)"],["With saturation (1:yes, 0:no)"],["Upper limit"],["Lower limit"]],list("mat",[-1,-1],"vec",1,"vec",1,"mat",[-1,-1],"mat",[-1,-1]),exprs); - if (!ok) { -break; -} - if (isreal(x0)) { - Datatype = 1; - } else { - Datatype = 2; -} - if (reinit!=0) { - reinit = 1; -} - if (satur!=0) { - satur = 1; - if (Datatype==1) { - if (size(maxp,"*")==1) { - maxp = maxp*ones(x0); -} - if (size(lowp,"*")==1) { - lowp = lowp*ones(x0); -} - if ((size(x0)!=size(maxp)||size(x0)!=size(lowp))) { -message("x0 and Upper limit and Lower limit must have same size"); - ok = false; - } else if (or(maxp<=lowp)) { -message("Upper limits must be > Lower limits"); - ok = false; - } else if (or(x0>maxp)||or(x0 Lower limits"); - ok = false; - } else if (or(real(x0)>real(maxp))||or(real(x0)imag(maxp))||or(imag(x0) Lower limits"); + ok = false; + } else if (or(x0>maxp)||or(x0 Lower limits"); + ok = false; + } else if (or(real(x0)>real(maxp))||or(real(x0)imag(maxp))||or(imag(x0)