summaryrefslogtreecommitdiff
path: root/data_structures/scifunc_block_m.js
diff options
context:
space:
mode:
authorAdhitya Kamakshidasan2016-06-18 15:20:18 +0530
committerGitHub2016-06-18 15:20:18 +0530
commitfa438a1d06e474d9fb03a8749457707529551a80 (patch)
tree650e27e63bd00de7ce0243d4c5daabb06a1d1668 /data_structures/scifunc_block_m.js
parent6dc05aec13c6c3c7081b3a03656a15401c97a88f (diff)
parentf7c301f991faf480dc2525d1e8afb8d5e0da1632 (diff)
downloadxcos-on-web-fa438a1d06e474d9fb03a8749457707529551a80.tar.gz
xcos-on-web-fa438a1d06e474d9fb03a8749457707529551a80.tar.bz2
xcos-on-web-fa438a1d06e474d9fb03a8749457707529551a80.zip
Merge pull request #43 from grenadier-amit/master
Data structures for xcos blocks
Diffstat (limited to 'data_structures/scifunc_block_m.js')
-rw-r--r--data_structures/scifunc_block_m.js50
1 files changed, 50 insertions, 0 deletions
diff --git a/data_structures/scifunc_block_m.js b/data_structures/scifunc_block_m.js
new file mode 100644
index 0000000..6aa53f3
--- /dev/null
+++ b/data_structures/scifunc_block_m.js
@@ -0,0 +1,50 @@
+function scifunc_block_m () {
+
+
+ var in = 1;
+
+ var out = 1;
+
+ var clkin = [];
+
+ var clkout = [];
+
+ var x0 = [];
+
+ var z0 = [];
+
+ var typ = "c";
+
+ var auto = [];
+
+ var rpar = [];
+
+ var it = 1;
+
+ var model = scicos_model();
+ model.sim=list("scifunc",3);
+ model.in=new ScilabDouble([in]);
+ model.in2.push(new ScilabDouble([in]));
+ model.intyp=new ScilabDouble([it]);
+ model.out=new ScilabDouble([out]);
+ model.out2.push(new ScilabDouble([out]));
+ model.outtyp=new ScilabDouble([it]);
+ model.evtin=clkin;
+ model.evtout=clkout;
+ model.state=x0;
+ model.dstate=z0;
+ model.rpar=rpar;
+ model.ipar = new ScilabDouble([0]);
+ model.opar=list();
+ model.blocktype=new ScilabString([typ]);
+ model.firing=auto;
+ model.dep_ut = new ScilabBoolean([true,false]);
+
+ var exprs = [list([sci2exp([in,in])],[sci2exp([out,out])],[sci2exp(clkin)],[sci2exp(clkout)];
+ strcat(sci2exp(x0));strcat(sci2exp(z0));
+
+ var strcat(sci2exp(rpar));sci2exp(auto);sci2exp(0)],list("y1 = sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
+
+ var gr_i = [];
+ this.x=new standard_define(new ScilabDouble([4,2]),model,exprs,gr_i);
+}