필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
shunmugam hemalatha
shunmugam hemalatha 2020년 3월 17일
댓글: Ameer Hamza 2020년 3월 18일
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);

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 3월 17일
편집: Ameer Hamza 2020년 3월 17일
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
shunmugam hemalatha
shunmugam hemalatha 2020년 3월 18일
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 2020년 3월 18일
Why do you think the solution is incorrect? Check the value of y_solution.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by