Help with solving an equation

2 views (last 30 days)
Amy Topaz
Amy Topaz on 13 Mar 2022
Commented: Amy Topaz on 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)

Accepted Answer

Sam Chak
Sam Chak on 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.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!