summaryrefslogtreecommitdiff
path: root/js/MatrixOp
diff options
context:
space:
mode:
authorSunil Shetye2018-06-16 19:47:55 +0530
committerSunil Shetye2018-06-18 10:46:22 +0530
commitdc0c2354295fc1c80d5c0e10b053e5926861b5d3 (patch)
treef985ad20bba0639e5d85e3be91552b4dca6f7fc9 /js/MatrixOp
parent3a3e1d6aa7fd38a910a7416040050ffa9550566e (diff)
downloadsci2js-dc0c2354295fc1c80d5c0e10b053e5926861b5d3.tar.gz
sci2js-dc0c2354295fc1c80d5c0e10b053e5926861b5d3.tar.bz2
sci2js-dc0c2354295fc1c80d5c0e10b053e5926861b5d3.zip
support var(:,:) syntax
Diffstat (limited to 'js/MatrixOp')
-rw-r--r--js/MatrixOp/CUMSUM.js8
-rw-r--r--js/MatrixOp/EXTRACT.js10
-rw-r--r--js/MatrixOp/EXTTRI.js8
-rw-r--r--js/MatrixOp/MATBKSL.js4
-rw-r--r--js/MatrixOp/MATDET.js4
-rw-r--r--js/MatrixOp/MATDIAG.js4
-rw-r--r--js/MatrixOp/MATDIV.js4
-rw-r--r--js/MatrixOp/MATEIG.js8
-rw-r--r--js/MatrixOp/MATEXPM.js4
-rw-r--r--js/MatrixOp/MATINV.js4
-rw-r--r--js/MatrixOp/MATLU.js4
-rw-r--r--js/MatrixOp/MATMAGPHI.js4
-rw-r--r--js/MatrixOp/MATMUL.js6
-rw-r--r--js/MatrixOp/MATPINV.js4
-rw-r--r--js/MatrixOp/MATRESH.js14
-rw-r--r--js/MatrixOp/MATSING.js8
-rw-r--r--js/MatrixOp/MATSUM.js8
-rw-r--r--js/MatrixOp/MATTRAN.js4
-rw-r--r--js/MatrixOp/MATZCONJ.js2
-rw-r--r--js/MatrixOp/MATZREIM.js4
-rw-r--r--js/MatrixOp/RICC.js2
-rw-r--r--js/MatrixOp/ROOTCOEF.js4
-rw-r--r--js/MatrixOp/SQRT.js4
-rw-r--r--js/MatrixOp/SUBMAT.js14
24 files changed, 70 insertions, 70 deletions
diff --git a/js/MatrixOp/CUMSUM.js b/js/MatrixOp/CUMSUM.js
index be176108..d7bfd393 100644
--- a/js/MatrixOp/CUMSUM.js
+++ b/js/MatrixOp/CUMSUM.js
@@ -28,7 +28,7 @@ function_name="cumsum_c";
out=[1,-2];
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=1;
ot=1;
@@ -41,13 +41,13 @@ function_name="cumsumz_r";
function_name="cumsumz_c";
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=2;
ot=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -84,7 +84,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp(0)];
gr_i=[];
x=standard_define([3,2],model,label,gr_i);
diff --git a/js/MatrixOp/EXTRACT.js b/js/MatrixOp/EXTRACT.js
index 6bd3ad1c..47322575 100644
--- a/js/MatrixOp/EXTRACT.js
+++ b/js/MatrixOp/EXTRACT.js
@@ -27,24 +27,24 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
ma=size(a,1);
mb=size(b,1);
if ((ma==0||mb==0)) {
message("empty field");
-ok=None;
+ok=false;
}
for (i=1;i<=ma;i+=1) {
if ((a(i)<=0)) {
message("invalid index");
-ok=None;
+ok=false;
}
}
for (j=1;j<=mb;j+=1) {
if ((b(j)<=0)) {
message("invalid index");
-ok=None;
+ok=false;
}
}
model.ipar=[a,b,ma,mb];
@@ -82,7 +82,7 @@ model.rpar=[];
model.ipar=[1,1,1,1];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp([1]),sci2exp([1])];
gr_i=[];
x=standard_define([3,2],model,label,gr_i);
diff --git a/js/MatrixOp/EXTTRI.js b/js/MatrixOp/EXTTRI.js
index 091a673f..3678eda5 100644
--- a/js/MatrixOp/EXTTRI.js
+++ b/js/MatrixOp/EXTTRI.js
@@ -25,7 +25,7 @@ function_name="exttriu";
function_name="extdiag";
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=1;
ot=1;
@@ -38,13 +38,13 @@ function_name="exttriuz";
function_name="extdiagz";
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=2;
ot=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -81,7 +81,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp(1)];
gr_i=[];
x=standard_define([3,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATBKSL.js b/js/MatrixOp/MATBKSL.js
index 10032568..d98ef69e 100644
--- a/js/MatrixOp/MATBKSL.js
+++ b/js/MatrixOp/MATBKSL.js
@@ -25,7 +25,7 @@ ot=2;
it=[2,2];
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -61,7 +61,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATDET.js b/js/MatrixOp/MATDET.js
index cf408e8e..d175ed9d 100644
--- a/js/MatrixOp/MATDET.js
+++ b/js/MatrixOp/MATDET.js
@@ -25,7 +25,7 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -61,7 +61,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATDIAG.js b/js/MatrixOp/MATDIAG.js
index 0c6db943..0607d5ce 100644
--- a/js/MatrixOp/MATDIAG.js
+++ b/js/MatrixOp/MATDIAG.js
@@ -25,7 +25,7 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -61,7 +61,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATDIV.js b/js/MatrixOp/MATDIV.js
index 927537fd..03cbcf4f 100644
--- a/js/MatrixOp/MATDIV.js
+++ b/js/MatrixOp/MATDIV.js
@@ -25,7 +25,7 @@ ot=2;
it=[2,2];
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -61,7 +61,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATEIG.js b/js/MatrixOp/MATEIG.js
index 64df3fd7..1cc90f01 100644
--- a/js/MatrixOp/MATEIG.js
+++ b/js/MatrixOp/MATEIG.js
@@ -27,7 +27,7 @@ out=[-1,-1,-1,-1];
ot=[2,2];
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=1;
} else if ((typ==2)) {
@@ -41,12 +41,12 @@ out=[-1,-1,-1,-1];
ot=[2,2];
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[-1,-1];
funtyp=4;
@@ -82,7 +82,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATEXPM.js b/js/MatrixOp/MATEXPM.js
index 07ca0bc8..da0311a1 100644
--- a/js/MatrixOp/MATEXPM.js
+++ b/js/MatrixOp/MATEXPM.js
@@ -25,7 +25,7 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -61,7 +61,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATINV.js b/js/MatrixOp/MATINV.js
index 3d5e26ab..f1e35efd 100644
--- a/js/MatrixOp/MATINV.js
+++ b/js/MatrixOp/MATINV.js
@@ -25,7 +25,7 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -61,7 +61,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATLU.js b/js/MatrixOp/MATLU.js
index 9587bbfa..b5550760 100644
--- a/js/MatrixOp/MATLU.js
+++ b/js/MatrixOp/MATLU.js
@@ -25,7 +25,7 @@ ot=[2,2];
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
if (ok) {
[model,graphics,ok]=set_io(model,graphics,list([model.in1,model.in2],it),list([model.out,model.out2],ot),[],[]);
@@ -59,7 +59,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=sci2exp(1);
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATMAGPHI.js b/js/MatrixOp/MATMAGPHI.js
index cf01de2b..efa28feb 100644
--- a/js/MatrixOp/MATMAGPHI.js
+++ b/js/MatrixOp/MATMAGPHI.js
@@ -30,7 +30,7 @@ out=[-1,-2];
ot=2;
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
funtyp=4;
if (ok) {
@@ -65,7 +65,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([3,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATMUL.js b/js/MatrixOp/MATMUL.js
index 62fb14df..f38e0dd5 100644
--- a/js/MatrixOp/MATMUL.js
+++ b/js/MatrixOp/MATMUL.js
@@ -24,11 +24,11 @@ break
rule=int(rule);
if ((dtype<1||dtype>8)) {
message("type is not supported");
-ok=None;
+ok=false;
}
if ((rule<1||rule>3)) {
message("Multiplication rule must be only 1,2 or 3");
-ok=None;
+ok=false;
}
if ((dtype==1||dtype==2)) {
np=0;
@@ -140,7 +140,7 @@ model.in1=[-1,-2];
model.in2=[-2,-3];
model.out=-1;
model.out2=-3;
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
model.ipar=1;
label=[sci2exp(model.ipar)];
gr_i=[];
diff --git a/js/MatrixOp/MATPINV.js b/js/MatrixOp/MATPINV.js
index aeeefd53..14df007b 100644
--- a/js/MatrixOp/MATPINV.js
+++ b/js/MatrixOp/MATPINV.js
@@ -25,7 +25,7 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -61,7 +61,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATRESH.js b/js/MatrixOp/MATRESH.js
index 3cdf2c00..77fb5bbb 100644
--- a/js/MatrixOp/MATRESH.js
+++ b/js/MatrixOp/MATRESH.js
@@ -19,24 +19,24 @@ nout=size(out);
nin=size(l1);
if (nout==0) {
message("output must have at least one element");
-ok=None;
+ok=false;
}
if (nin==0) {
message("input must have at least one element");
-ok=None;
+ok=false;
}
if (ok) {
if (((out(1)>(l1(1)*l1(2))))) {
message("the first dimension of the output is too big");
-ok=None;
+ok=false;
}
if (((out(2)>(l1(1)*l1(2))))) {
message("the second dimension of the output is too big");
-ok=None;
+ok=false;
}
if ((((out(2)*out(1))>(l1(1)*l1(2))))) {
message("the dimensions of the output are too big");
-ok=None;
+ok=false;
}
}
if ((typ==1)) {
@@ -49,7 +49,7 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
if (ok) {
label=lab;
@@ -86,7 +86,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp([1,1]),sci2exp([1,1])];
gr_i=[];
x=standard_define([3,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATSING.js b/js/MatrixOp/MATSING.js
index af7ed201..f03be1a8 100644
--- a/js/MatrixOp/MATSING.js
+++ b/js/MatrixOp/MATSING.js
@@ -29,7 +29,7 @@ out=[-1,-1,-1,-2,-2,-2];
ot=[1,1,1];
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=1;
} else if ((typ==2)) {
@@ -45,12 +45,12 @@ out=[-1,-1,-1,-2,-2,-2];
ot=[2,1,2];
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
funtyp=4;
if (ok) {
@@ -85,7 +85,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATSUM.js b/js/MatrixOp/MATSUM.js
index 58522aa3..357c4669 100644
--- a/js/MatrixOp/MATSUM.js
+++ b/js/MatrixOp/MATSUM.js
@@ -28,7 +28,7 @@ function_name="mat_sumc";
out=[1,-2];
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=1;
ot=1;
@@ -44,13 +44,13 @@ function_name="matz_sumc";
out=[1,-2];
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
it=2;
ot=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
funtyp=4;
@@ -86,7 +86,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp(0)];
gr_i=[];
x=standard_define([3,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATTRAN.js b/js/MatrixOp/MATTRAN.js
index dec912fc..eb4c876a 100644
--- a/js/MatrixOp/MATTRAN.js
+++ b/js/MatrixOp/MATTRAN.js
@@ -29,7 +29,7 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[model.in1,model.in2];
out=[model.out,model.out2];
@@ -53,7 +53,7 @@ model.in1=-1;
model.in2=-2;
model.out=-2;
model.out2=-1;
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([3,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATZCONJ.js b/js/MatrixOp/MATZCONJ.js
index 8186c3dc..fa566a17 100644
--- a/js/MatrixOp/MATZCONJ.js
+++ b/js/MatrixOp/MATZCONJ.js
@@ -24,7 +24,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/MATZREIM.js b/js/MatrixOp/MATZREIM.js
index 8ec90ce8..2d346af2 100644
--- a/js/MatrixOp/MATZREIM.js
+++ b/js/MatrixOp/MATZREIM.js
@@ -30,7 +30,7 @@ out=[-1,-2];
ot=2;
} else {
message("decomposition type is not supported");
-ok=None;
+ok=false;
}
funtyp=4;
if (ok) {
@@ -65,7 +65,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=sci2exp(1);
gr_i=[];
x=standard_define([3,2],model,label,gr_i);
diff --git a/js/MatrixOp/RICC.js b/js/MatrixOp/RICC.js
index 243b407b..c8497b9a 100644
--- a/js/MatrixOp/RICC.js
+++ b/js/MatrixOp/RICC.js
@@ -50,7 +50,7 @@ model.rpar=[];
model.ipar=[1,1];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/ROOTCOEF.js b/js/MatrixOp/ROOTCOEF.js
index 9487ba00..94701457 100644
--- a/js/MatrixOp/ROOTCOEF.js
+++ b/js/MatrixOp/ROOTCOEF.js
@@ -25,7 +25,7 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
in1=[inp,model.in2];
out=[inp+1,model.out2];
@@ -61,7 +61,7 @@ model.rpar=[];
model.ipar=[];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp(1)];
gr_i=[];
x=standard_define([3,2],model,label,gr_i);
diff --git a/js/MatrixOp/SQRT.js b/js/MatrixOp/SQRT.js
index d63b0385..d5308162 100644
--- a/js/MatrixOp/SQRT.js
+++ b/js/MatrixOp/SQRT.js
@@ -18,7 +18,7 @@ function_name="mat_sqrt";
function_name="matz_sqrt";
} else {
message("type is not supported");
-ok=None;
+ok=false;
}
it=typ;
ot=typ;
@@ -46,7 +46,7 @@ model.intyp=1;
model.outtyp=1;
model.out=-1;
model.out2=-2;
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1)];
gr_i=[];
x=standard_define([2,2],model,label,gr_i);
diff --git a/js/MatrixOp/SUBMAT.js b/js/MatrixOp/SUBMAT.js
index 31b92337..76be0254 100644
--- a/js/MatrixOp/SUBMAT.js
+++ b/js/MatrixOp/SUBMAT.js
@@ -25,27 +25,27 @@ ot=2;
it=2;
} else {
message("Datatype is not supported");
-ok=None;
+ok=false;
}
if ((a<=0)||(b<=0)||(c<=0)||(d<=0)) {
message("invalid index");
-ok=None;
+ok=false;
}
if (b<a) {
message("ending row must be greater than starting row");
-ok=None;
+ok=false;
}
if (d<c) {
message("ending column must be greater than starting column");
-ok=None;
+ok=false;
}
if (b>inp(1)) {
message("index of ending row is out of range");
-ok=None;
+ok=false;
}
if (d>inp(2)) {
message("index of ending column is out of range");
-ok=None;
+ok=false;
}
model.ipar=[a,b,c,d];
in1=[inp(1),inp(2)];
@@ -82,7 +82,7 @@ model.rpar=[];
model.ipar=[1,1,1,1];
model.blocktype="c";
model.firing=[];
-model.dep_ut=[true,None];
+model.dep_ut=[true,false];
label=[sci2exp(1),sci2exp(1),sci2exp(1),sci2exp(1),sci2exp(1)];
gr_i=[];
x=standard_define([2.5,2],model,label,gr_i);