Help with solving an equation

1 visualización (últimos 30 días)
Amy Topaz
Amy Topaz el 13 de Mzo. de 2022
Comentada: Amy Topaz el 13 de Mzo. de 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)

Respuesta aceptada

Sam Chak
Sam Chak el 13 de Mzo. de 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.

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by