Im having a problem with finding the zeros of a sin function in a certain domain
조회 수: 10 (최근 30일)
이전 댓글 표시
Here is my code
g=inline('sin(x)-(3x/2)')
Zero_g=fzero(g,[-pi,2*pi])
댓글 수: 0
채택된 답변
Star Strider
2014년 9월 28일
Small typo errors in ‘g’ (missing multiplication operator and missing input argument variable declaration). I replaced it with an anonymous function:
g = @(x) sin(x)-(3*x/2);
Zero_g = fzero(g, [-pi 2*pi])
It works.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Decomposition에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!