Help with solving an equation

1 visualizzazione (ultimi 30 giorni)
Amy Topaz
Amy Topaz il 13 Mar 2022
Commentato: Amy Topaz il 13 Mar 2022
I am getting an error while trying to solve the below equation (Function value at interval endpoints must differ in sign)
Any idea how to solve it
upCOX = 125;
vtp = -0.15;
lambda = -0.01;
l = 1;
we = 1;
Rload = 10000;
vdd = 1;
va = 0.2;
vgs = va - vy;
eq1 = @(vy) - 1 + vy + Rload*((upCOX*(we/l)*(1-vy*lambda)*(((vgs-vtp)*(-vy))-(0.5*(vy)^2))));
x1 = [0 1];
vy = fzero(eq1,x1);
disp(vy)

Risposta accettata

Sam Chak
Sam Chak il 13 Mar 2022
Make a direct substitution of vgs into the equation.
upCOX = 125;
vtp = -0.15;
lambda = -0.01;
l = 1;
we = 1;
Rload = 10000;
vdd = 1;
va = 0.2;
% vgs = va - vy;
eq1 = @(vy) - 1 + vy + Rload*((upCOX*(we/l)*(1 - vy*lambda)*((((va - vy) - vtp)*(- vy)) - (0.5*(vy)^2))));
x1 = [0 1];
vy = fzero(eq1, x1);
disp(vy)
Hope it helps.

Più risposte (0)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by