Is this code right?

5 visualizzazioni (ultimi 30 giorni)
Bob
Bob il 31 Gen 2015
Commentato: Daniela Valdés il 31 Gen 2015
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 Commenti
Bob
Bob il 31 Gen 2015
Anyone?
Daniela Valdés
Daniela Valdés il 31 Gen 2015
No. Use:
fzero(@(x) sin(x)-cos(2*x),1)

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Problem-Based Optimization Setup in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by