How to find zero on plot?
古いコメントを表示
I have the code:
function [out] = iteration(N)
if N<0
error('less than 0');
end
x(1)=1;
for k=1:N-1
x(k+1) = exp(-sin(x(k)));
end
fprintf('Iteration given: '), x;
f = @(x) exp(-sin(x)) - x;
fplot(f, [0, pi]);
title('Searching for zero');
xz=fzero(fun,1);
out=x;
end
I need to find and display the zero values using xz=fzero(fun,1). How would I go about this been stuck here for a while now.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Graph and Network Algorithms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!