필터 지우기
필터 지우기

how to get the value of x, from this equation: 0.2exp(x)-x^(0.25) = 0

조회 수: 1 (최근 30일)
Hafizul Sikder
Hafizul Sikder 2020년 10월 18일
답변: mike Croucher 2020년 10월 18일
% I tried with the below steps:
fun = @(x) (0.2*exp(x)-x.^(0.25));
x0 = [1.5,0];
x = fsolve(fun,x0);

답변 (2개)

Star Strider
Star Strider 2020년 10월 18일
I do not understand what the problem is:
fun = @(x) (0.2*exp(x)-x.^(0.25));
x0 = [1.5,0];
x = fsolve(fun,x0);
xv = linspace(0,2);
figure
plot(xv, fun(xv))
hold on
plot(x, fun(x), 'rx')
hold off
grid
producing:
This appears to work, and provide the solutions you want.

mike Croucher
mike Croucher 2020년 10월 18일
That seems to have done the job. I typed your commands and got
x =
1.7492 0.0016
Substituting this into your function gives a vector of results extremely close to 0:
fun(x)
ans =
1.0e-08 *
0.0000 0.1948
Is this what you were hoping for?

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by