Is this code right?

조회 수: 17 (최근 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 CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by