필터 지우기
필터 지우기

How to solve this kind of equation

조회 수: 1 (최근 30일)
Omri
Omri 2012년 12월 11일
Hi all!
How do I solve the equation y=sin(x)+ e^(0.25x-1.5)? I need the roots...
Also how do I draw it and show the x and y axes?
Thanks!
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 12월 11일
That is not a polynomial equation!
Omri
Omri 2012년 12월 11일
Sorry, fixed the topic.

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

답변 (2개)

John Petersen
John Petersen 2012년 12월 11일
x = [-20:.01:20]';
y=sin(x)+exp(0.25*x-1.5);
figure;plot(x,y);grid
  댓글 수: 2
Omri
Omri 2012년 12월 11일
Thanks. I'm also looking for the roots, how can I calculate them?
John Petersen
John Petersen 2012년 12월 12일
Numerically. But, as you can see from the plot, when x <-10 it becomes a sine wave. Also, all the roots are x<5.3 so that can constrain your search.

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


Matt J
Matt J 2012년 12월 11일
편집: Matt J 2012년 12월 11일
The function has infinitely many roots, but here's a way to find one of them
fun=@(x) sin(x)+ exp(0.25*x-1.5)
xroot = fzero(fun, 0)
and to plot in some interval, e.g. [-10,3]
fplot(fun, [-10,3])

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by