diff options
author | Sunil Shetye | 2018-06-18 23:41:23 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-19 10:31:46 +0530 |
commit | 1170404c7650cb531534b308f103c9b6abd50d14 (patch) | |
tree | a6a61ae2a9a3592440483906ce6c7254b3243553 /js/MatrixOp/SUBMAT.js | |
parent | cd5b0819762aa4a1cb72d29ab7b8c3ac65bbad76 (diff) | |
download | sci2js-1170404c7650cb531534b308f103c9b6abd50d14.tar.gz sci2js-1170404c7650cb531534b308f103c9b6abd50d14.tar.bz2 sci2js-1170404c7650cb531534b308f103c9b6abd50d14.zip |
handle multiple rows
Diffstat (limited to 'js/MatrixOp/SUBMAT.js')
-rw-r--r-- | js/MatrixOp/SUBMAT.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/MatrixOp/SUBMAT.js b/js/MatrixOp/SUBMAT.js index 6ea6f8a4..77b8cfcd 100644 --- a/js/MatrixOp/SUBMAT.js +++ b/js/MatrixOp/SUBMAT.js @@ -16,11 +16,11 @@ model.evtout=[]; model.state=[]; model.dstate=[]; model.rpar=[]; -model.ipar=[1,1,1,1]; +model.ipar=[[1],[1],[1],[1]]; model.blocktype="c"; model.firing=[]; model.dep_ut=[true,false]; -label=[sci2exp(1),sci2exp(1),sci2exp(1),sci2exp(1),sci2exp(1)]; +label=[[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)]]; gr_i=[]; x=standard_define([2.5,2],model,label,gr_i); } @@ -37,7 +37,7 @@ if (size(label,"*")==5) { label[6-1]=sci2exp([1,1]); } while (true) { -[ok,typ,a,b,c,d,inp,exprs]=scicos_getvalue("Set SUBMAT Block",["Datatype (1=real double 2=Complex)","Starting Row Index","Ending Row Index","Starting Column Index","Ending Column Index","Input Dimensions"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",2),label); +[ok,typ,a,b,c,d,inp,exprs]=scicos_getvalue("Set SUBMAT Block",[["Datatype (1=real double 2=Complex)"],["Starting Row Index"],["Ending Row Index"],["Starting Column Index"],["Ending Column Index"],["Input Dimensions"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",2),label); if (!ok) { break; } @@ -73,7 +73,7 @@ if (d>inp(2)) { message("index of ending column is out of range"); ok=false; } -model.ipar=[a,b,c,d]; +model.ipar=[[a],[b],[c],[d]]; in1=[inp(1),inp(2)]; out=[(b-a)+1,(d-c)+1]; funtyp=4; |