Help with solving an equation

1 vue (au cours des 30 derniers jours)
Amy Topaz
Amy Topaz le 13 Mar 2022
Commenté : Amy Topaz le 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)

Réponse acceptée

Sam Chak
Sam Chak le 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.
  1 commentaire
Amy Topaz
Amy Topaz le 13 Mar 2022
thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by