summaryrefslogtreecommitdiff
path: root/js/Linear/DIFF_c.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Linear/DIFF_c.js')
-rw-r--r--js/Linear/DIFF_c.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js
index 11b4281f..9549a346 100644
--- a/js/Linear/DIFF_c.js
+++ b/js/Linear/DIFF_c.js
@@ -2,16 +2,16 @@
function DIFF_c() {
DIFF_c.prototype.define = function DIFF_c() {
this.x0 = [[0],[0]];
- model = scicos_model();
- model.sim = list("diffblk_c",10004);
- model.in1 = 1;
- model.out = 1;
- model.state = this.x0;
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("diffblk_c",10004);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.state = this.x0;
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
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);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DIFF_c.prototype.details = function DIFF_c() {
@@ -30,7 +30,7 @@ function DIFF_c() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
ask_again = false;
[ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",-1,"vec",-1),exprs);
@@ -51,11 +51,11 @@ function DIFF_c() {
}
if (!ask_again) {
graphics.exprs = exprs;
- model.state = [[this.x0],[this.xd0]];
- model.out = [N];
- model.in1 = N;
+ this.model.state = [[this.x0],[this.xd0]];
+ this.model.out = [N];
+ this.model.in1 = new ScilabDouble(N);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}