Azzera filtri
Azzera filtri

solving for a single unknown variable(non-linear equation)

1 visualizzazione (ultimi 30 giorni)
E=0.0313; E^2=0.00098; E^3=0.00003;
d=5000; K=100; h=5; lamda=0.5; C=25; S=50; P=0.05;
a=1-E;
b=((2*y)+(y*E)+1))^2;
y=(1/a)*(1/b)*((2*d*S)-(2*d*C)-(2*d*lamda)+(4*D*K)+(2*d*K*E)-(2*h*y^2)+(2*h*y^2*E^2)-(h*y^2*E)+(h*y^2*E^3)-(2*h*y)+(2*h*y*E^2);

Risposte (1)

Ameer Hamza
Ameer Hamza il 17 Mar 2020
Modificato: Ameer Hamza il 17 Mar 2020
You need to use fsolve to solve such an equation. First, define a function handle and then use fsolve
E=0.0313;
d=5000; K=100; h=5; lamda=0.5; C=25; S=50; P=0.05;
a=1-E;
b=@(y) ((2*y)+(y*E)+1)^2;
f = @(y) y - (1/a)*(1/b(y))*((2*d*S)-(2*d*C)-(2*d*lamda)+(4*d*K)+(2*d*K*E)-(2*h*y^2)+(2*h*y^2*E^2)-(h*y^2*E)+(h*y^2*E^3)-(2*h*y)+(2*h*y*E^2));
y_solution = fsolve(f, 0);
  2 Commenti
shunmugam hemalatha
shunmugam hemalatha il 18 Mar 2020
Thankyou Mr. Ameer Hamza for your response.But still I could't find the solution. Will you please, suggest some other codings.
Ameer Hamza
Ameer Hamza il 18 Mar 2020
Why do you think the solution is incorrect? Check the value of y_solution.

Accedi per commentare.

Categorie

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

Community Treasure Hunt

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

Start Hunting!

Translated by