diff options
author | Sunil Shetye | 2018-07-12 23:16:08 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-13 10:21:08 +0530 |
commit | 214ade87a6cef2bf55f9b9f2848ffafc02f37f18 (patch) | |
tree | 50fdfe7b1e8850622825e362ca865be3f0911009 /js/Events/freq_div.js | |
parent | a2bfd6050ab2b5b6bbede92393b1f61d4ecc25aa (diff) | |
download | sci2js-214ade87a6cef2bf55f9b9f2848ffafc02f37f18.tar.gz sci2js-214ade87a6cef2bf55f9b9f2848ffafc02f37f18.tar.bz2 sci2js-214ade87a6cef2bf55f9b9f2848ffafc02f37f18.zip |
add more global variables
Diffstat (limited to 'js/Events/freq_div.js')
-rw-r--r-- | js/Events/freq_div.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/js/Events/freq_div.js b/js/Events/freq_div.js index 7e3f8b68..d49a8486 100644 --- a/js/Events/freq_div.js +++ b/js/Events/freq_div.js @@ -103,8 +103,8 @@ function freq_div() { this.model.evtin = new ScilabDouble([1]); this.model.evtout = new ScilabDouble([1]); this.model.rpar = scs_m_1; - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"freq_div\",sz(1),sz(2));"]); - this.x = standard_define([3,2],this.model,[],gr_i); + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"freq_div\",sz(1),sz(2));"]); + this.x = standard_define([3,2],this.model,[],this.gr_i); return new BasicBlock(this.x); } freq_div.prototype.details = function freq_div() { @@ -120,6 +120,7 @@ function freq_div() { freq_div.prototype.set = function freq_div() { %ph = parseFloat(arguments[0]["%ph"]) %df = parseFloat(arguments[0]["%df"]) + this.exprs = inverse(arguments[0]["exprs"]) for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { var o = arg1.model.rpar.objs[i-1]; if (typeof(o)=="Block"&&o.gui=="Modulo_Count") { @@ -137,10 +138,10 @@ function freq_div() { var xx = arg1[spath-1]; var xxn = xx; this.graphics = xx.graphics; - var exprs = this.graphics.exprs; + this.exprs = this.graphics.exprs; this.model = xx.model; while (true) { - [ok,%ph,%df,exprs] = scicos_getvalue("Set frequency division block parameters",["Phase (0 to division factor -1)","Division factor"],list("vec",1,"vec",1),exprs); + [ok,%ph,%df,this.exprs] = scicos_getvalue("Set frequency division block parameters",["Phase (0 to division factor -1)","Division factor"],list("vec",1,"vec",1),this.exprs); if (!ok) { break; } @@ -152,7 +153,7 @@ function freq_div() { if (%ph>%df-1) { %ph = %df-1; } - this.graphics.exprs = new ScilabDouble(exprs); + this.graphics.exprs = new ScilabDouble(this.exprs); this.model.ipar = new ScilabDouble([%df]); this.model.dstate = new ScilabDouble([%ph]); xxn.graphics = this.graphics; |