Is this code right?

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 件)

カテゴリ

ヘルプ センター および File ExchangeProblem-Based Optimization Setup についてさらに検索

タグ

質問済み:

Bob
2015 年 1 月 31 日

コメント済み:

2015 年 1 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by