フィルターのクリア

find positive and nonzero roots of function matlab

3 ビュー (過去 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 Center および File ExchangeOptimization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by