diff options
Diffstat (limited to 'js/Linear/CLSS_f.js')
-rw-r--r-- | js/Linear/CLSS_f.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/js/Linear/CLSS_f.js b/js/Linear/CLSS_f.js index e30c06fa..d1efb421 100644 --- a/js/Linear/CLSS_f.js +++ b/js/Linear/CLSS_f.js @@ -1,22 +1,22 @@ /* autogenerated from "macros/Linear/CLSS_f.sci" */ function CLSS_f() { CLSS_f.prototype.define = function CLSS_f() { - x0 = 0; - A = -1; - B = 1; - C = 1; - D = 0; + this.x0 = 0; + this.A = -1; + this.B = 1; + this.C = 1; + this.D = 0; in1 = 1; out = 1; model = scicos_model(); model.sim = list("csslti",1); model.in1 = in1; model.out = out; - model.state = x0; - model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]]; + model.state = this.x0; + model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]]; model.blocktype = "c"; model.dep_ut = [false,true]; - exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]]; + exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]]; gr_i = []; this.x = standard_define([4,2],model,exprs,gr_i); return new BasicBlock(this.x); @@ -35,28 +35,28 @@ function CLSS_f() { } model = arg1.model; while (true) { - [ok,A,B,C,D,x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs); + [ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs); if (!ok) { break; } - out = size(C,1); + out = size(this.C,1); if (out==0) { out = []; } - in1 = size(B,2); + in1 = size(this.B,2); if (in1==0) { in1 = []; } - [ms,ns] = size(A); + [ms,ns] = size(this.A); if (ms!=ns) { message("A matrix must be square"); } else { [model,graphics,ok] = check_io(model,graphics,in1,out,[],[]); if (ok) { graphics.exprs = exprs; - rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]]; - if (D!=[]) { - if (norm(D,1)!=0) { + rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]]; + if (this.D!=[]) { + if (norm(this.D,1)!=0) { mmm = [true,true]; } else { mmm = [false,true]; @@ -67,7 +67,7 @@ function CLSS_f() { } else { model.dep_ut = [false,true]; } - model.state = x0.slice(); + model.state = this.x0.slice(); model.rpar = rpar; this.x.graphics = graphics; this.x.model = model; |