summaryrefslogtreecommitdiff
path: root/js/Electrical/NMOS.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Electrical/NMOS.js')
-rw-r--r--js/Electrical/NMOS.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js
index 7e4d8ae2..d92186dd 100644
--- a/js/Electrical/NMOS.js
+++ b/js/Electrical/NMOS.js
@@ -57,17 +57,17 @@ function NMOS() {
this.dL = parseFloat(arguments[0]["dL"])
this.RDS = parseFloat(arguments[0]["RDS"])
this.x = arg1;
- var graphics = arg1.graphics;
- var exprs = graphics.exprs;
+ this.graphics = arg1.graphics;
+ var exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,exprs] = scicos_getvalue("Set NMOS Transistor block parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- this.model.equations.parameters[2] = list(new ScilabDouble([this.W]), new ScilabDouble([this.L]), new ScilabDouble([this.Beta]), new ScilabDouble([this.Vt]), new ScilabDouble([this.K2]), new ScilabDouble([this.K5]), new ScilabDouble([this.dW]), new ScilabDouble([this.dL]), new ScilabDouble([this.RDS]));
- graphics.exprs = exprs;
- this.x.graphics = graphics;
+ this.model.equations.parameters[2-1] = list(new ScilabDouble([this.W]), new ScilabDouble([this.L]), new ScilabDouble([this.Beta]), new ScilabDouble([this.Vt]), new ScilabDouble([this.K2]), new ScilabDouble([this.K5]), new ScilabDouble([this.dW]), new ScilabDouble([this.dL]), new ScilabDouble([this.RDS]));
+ this.graphics.exprs = new ScilabDouble([exprs]);
+ this.x.graphics = this.graphics;
this.x.model = this.model;
break;
}