diff options
author | Adhitya Kamakshidasan | 2016-07-28 21:53:13 +0530 |
---|---|---|
committer | Adhitya Kamakshidasan | 2016-07-28 21:53:13 +0530 |
commit | 572f2fef124c7e62afb917ef9c596a22724da077 (patch) | |
tree | 6d2be425cc2c89975e3c7f96393c1a55cf305a6a /data_structures_correct/BOUNCE.js | |
parent | 1f98bf44777c0669ddb780a9875578593048c5a8 (diff) | |
download | xcos-on-web-572f2fef124c7e62afb917ef9c596a22724da077.tar.gz xcos-on-web-572f2fef124c7e62afb917ef9c596a22724da077.tar.bz2 xcos-on-web-572f2fef124c7e62afb917ef9c596a22724da077.zip |
Support for Maven added
Diffstat (limited to 'data_structures_correct/BOUNCE.js')
-rw-r--r-- | data_structures_correct/BOUNCE.js | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/data_structures_correct/BOUNCE.js b/data_structures_correct/BOUNCE.js deleted file mode 100644 index e63b241..0000000 --- a/data_structures_correct/BOUNCE.js +++ /dev/null @@ -1,51 +0,0 @@ -function BOUNCE() { - - BOUNCE.prototype.define = function BOUNCE() { - this.n = 2; - - this.k = 0; - this.ipar = []; - - for (var i = 1; i <= this.n; i++) { - for (var j = i + 1; j <= this.n; j++) { - this.ipar[this.k] = [i]; - this.k++; - this.ipar[this.k] = [j]; - this.k++; - } - } - - this.walls = [[0],[5],[0],[5]]; - this.x1 = [[2],[2.5]]; - this.xd = [[0],[0]]; - this.y1 = [[3],[5]]; - this.yd = [[0],[0]]; - this.g = 9.81; - this.C = 0; - this.rpar1 = ones(this.n, 1); - this.rpar2 = this.rpar1; - this.state = [...math.transpose(this.x1), ...math.transpose(this.xd), ...math.transpose(this.y1), ...math.transpose(this.yd)]; - - var model = scicos_model(); - model.sim = list(new ScilabString(["bounce_ball"]), new ScilabDouble([4])); - model.in = new ScilabDouble(); - model.out = new ScilabDouble([this.n], [this.n]); - model.state = new ScilabDouble(...colon_operator(this.state)); - model.rpar = new ScilabDouble(...this.rpar1, ...this.rpar2, ...this.walls, [this.g], [this.C]); - model.ipar = new ScilabDouble(...this.ipar); - model.nzcross = new ScilabDouble([this.n * (this.n - 1) / 2 + 4 * this.n]); - model.blocktype = new ScilabString(["c"]); - model.dep_ut = new ScilabBoolean([false, true]); - - var exprs = new ScilabString([sci2exp(this.rpar1)], [sci2exp(this.rpar2)], [sci2exp(this.walls)], [sci2exp(this.x1)], [sci2exp(this.xd)], [sci2exp(this.y1)], [sci2exp(this.yd)]); - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"BOUNCE\",sz(1),sz(2));"]); - this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i); - - return new BasicBlock(this.x); - } - - BOUNCE.prototype.details = function BOUNCE() { - - return this.x; - } -} |