필터 지우기
필터 지우기

find positive and nonzero roots of function matlab

조회 수: 8 (최근 30일)
Alper Sahin
Alper Sahin 2021년 12월 11일
댓글: Walter Roberson 2021년 12월 11일
sin(x)-0.1*x=0 find positive and nonzero roots . thank you

답변 (1개)

Walter Roberson
Walter Roberson 2021년 12월 11일
f = @(x) sin(x) - x/10;
fplot(f, [-11, 11]);
yline(0)
You can see from this that there are 7 solutions. You can read the approximate positions from the graph, and use fzero() to find the exact locations.
  댓글 수: 3
Torsten
Torsten 2021년 12월 11일
As Walter pointed out, you will have to choose the starting point for fzero approximately at the position where the zero is located. This position can be seen from the above graph.
Walter Roberson
Walter Roberson 2021년 12월 11일
fzero() can only find one solution at a time; you will need to use several different starting points.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by