summaryrefslogtreecommitdiff
path: root/js/Threshold/ZCROSS_f.js
diff options
context:
space:
mode:
authorSunil Shetye2018-07-11 13:05:13 +0530
committerSunil Shetye2018-07-11 15:21:08 +0530
commit079d0b4a3ec15a4d7d2644484d116df9d1c694bb (patch)
tree785ed59b5b238203a9e91f3e323da59d1083d86e /js/Threshold/ZCROSS_f.js
parent0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff)
downloadsci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip
fix assignment to list
Diffstat (limited to 'js/Threshold/ZCROSS_f.js')
-rw-r--r--js/Threshold/ZCROSS_f.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js
index d9b558ef..f31d3e0a 100644
--- a/js/Threshold/ZCROSS_f.js
+++ b/js/Threshold/ZCROSS_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Threshold/ZCROSS_f.sci" */
function ZCROSS_f() {
ZCROSS_f.prototype.define = function ZCROSS_f() {
- rpar = [[-1],[-1],[0],[0]];
+ var rpar = [[-1],[-1],[0],[0]];
this.in1 = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
@@ -12,8 +12,8 @@ function ZCROSS_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [true,false];
- exprs = strcat(sci2exp(this.in1));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.in1));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,8 +28,8 @@ function ZCROSS_f() {
ZCROSS_f.prototype.set = function ZCROSS_f() {
this.in1 = parseFloat(arguments[0]["in1"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,exprs] = scicos_getvalue([["Set Zero-Crossing parameters"],["All surfaces must cross together"]],"Input size",list("vec",1),exprs);
@@ -40,9 +40,9 @@ function ZCROSS_f() {
if (this.in1<=0) {
message("Block must have at least one input");
} else {
- kk = 0;
+ var kk = 0;
for (jj=1;jj<=this.in1;jj+=1) {
- kk = kk+2^(this.in1+jj-1);
+ var kk = kk+2^(this.in1+jj-1);
}
this.model.rpar = new ScilabDouble([-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]);
graphics.exprs = exprs;