why the code is incorrect? and where is incorrect? Matlab told me the function is incorrect, why?
조회 수: 2 (최근 30일)
이전 댓글 표시
채택된 답변
Stephen23
2023년 4월 24일
편집: Stephen23
2023년 4월 24일
"why the code is incorrect?"
FZERO expects its first input argument to be a function handle:
"and where is incorrect?"
You did not define a function handle, just like FZERO requires. I fixed that for you:
fun = @(x) 2*exp(-x)+sin(x);
% ^^^^ create anonymous function, FUN is its handle.
x0 = [3 4];
x = fzero(fun,x0)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!