summaryrefslogtreecommitdiff
path: root/js/Linear/INTEGRAL.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Linear/INTEGRAL.js')
-rw-r--r--js/Linear/INTEGRAL.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/js/Linear/INTEGRAL.js b/js/Linear/INTEGRAL.js
index 12b96030..281555c3 100644
--- a/js/Linear/INTEGRAL.js
+++ b/js/Linear/INTEGRAL.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/INTEGRAL.sci" */
function INTEGRAL() {
INTEGRAL.prototype.define = function INTEGRAL() {
- maxp = 1;
+ this.maxp = 1;
minp = -1;
rpar = [];
model = scicos_model();
@@ -12,7 +12,7 @@ function INTEGRAL() {
model.rpar = rpar;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = string([[0],[0],[0],[maxp],[minp]]);
+ exprs = string([[0],[0],[0],[this.maxp],[minp]]);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
this.x.graphics.id = "1/s";
@@ -29,37 +29,37 @@ function INTEGRAL() {
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("vec",-1,"vec",1,"vec",1,"vec",-1,"vec",-1),exprs);
+ [ok,this.x0,this.reinit,this.satur,this.maxp,this.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("vec",-1,"vec",1,"vec",1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- x0 = x0.slice();
- maxp = maxp.slice();
- lowp = lowp.slice();
- if (reinit!=0) {
- reinit = 1;
+ this.x0 = this.x0.slice();
+ this.maxp = this.maxp.slice();
+ this.lowp = this.lowp.slice();
+ if (this.reinit!=0) {
+ this.reinit = 1;
}
- if (satur!=0) {
- satur = 1;
- if (size(maxp,"*")==1) {
- maxp = maxp*ones(x0);
+ if (this.satur!=0) {
+ this.satur = 1;
+ if (size(this.maxp,"*")==1) {
+ this.maxp = this.maxp*ones(this.x0);
}
- if (size(lowp,"*")==1) {
- lowp = lowp*ones(x0);
+ if (size(this.lowp,"*")==1) {
+ this.lowp = this.lowp*ones(this.x0);
}
- if ((size(x0,1)!=size(maxp,1)||size(x0,1)!=size(lowp,1))) {
+ if ((size(this.x0,1)!=size(this.maxp,1)||size(this.x0,1)!=size(this.lowp,1))) {
message("x0 and Upper limit and Lower limit must have same size");
ok = false;
- } else if (or(maxp<=lowp)) {
+ } else if (or(this.maxp<=this.lowp)) {
message("Upper limits must be > Lower limits");
ok = false;
- } else if (or(x0>maxp)||or(x0<lowp)) {
+ } else if (or(this.x0>this.maxp)||or(this.x0<this.lowp)) {
message("Initial condition x0 should be inside the limits");
ok = false;
} else {
- rpar = [[maxp],[lowp]];
- model.nzcross = size(x0,1);
- model.nmode = size(x0,1);
+ rpar = [[this.maxp],[this.lowp]];
+ model.nzcross = size(this.x0,1);
+ model.nmode = size(this.x0,1);
}
} else {
rpar = [];
@@ -68,8 +68,8 @@ function INTEGRAL() {
}
if (ok) {
model.rpar = rpar;
- model.state = x0;
- [model,graphics,ok] = check_io(model,graphics,size(x0,1)*[[1],[ones(reinit,1)]],size(x0,1),ones(reinit,1),[]);
+ model.state = this.x0;
+ [model,graphics,ok] = check_io(model,graphics,size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,1),ones(this.reinit,1),[]);
}
if (ok) {
graphics.exprs = exprs;