Question: how to find zeros of a function on matlab?
Answer: lb = 0; % Set a lower bound for the function. ub = 2*pi; % Set an upper bound for the function. x = NaN*ones(100,1); % Initializes x. starting_points=linspace(0,2*pi,100); for i=1:100. % Look for the zeros in the function's current window. x(i)=fzero(@(x)sin(10*x), starting_points(i)); end.