Is this code right?

5 ビュー (過去 30 日間)
Bob
Bob 2015 年 1 月 31 日
コメント済み: Daniela Valdés 2015 年 1 月 31 日
question: Use fzero to approximate a root of sin(x) = cos(2x) near x = 1.
code: fzero('sin(x)==cos(2*x)',1)
answer: 1
  2 件のコメント
Bob
Bob 2015 年 1 月 31 日
Anyone?
Daniela Valdés
Daniela Valdés 2015 年 1 月 31 日
No. Use:
fzero(@(x) sin(x)-cos(2*x),1)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by