## Nzeros(fun, xmin, xmax, N)

version 1.3.0.0 (1.45 KB) by
%% This function computes atmost N zeros (z) between xmin and xmax

Updated 27 Oct 2017

%% This function computes atmost N zeros (z) between xmin and xmax
% fun is the handle to the function whose zeros we want to compute
% xmin is the start of the search region
% xmax is the end of the search region
% N is the maximum number of the zeros we sort
% Example 1: z = Nzeros(@(x)besselj(0,x), 0, 20, 7)
% Example 2: z = Nzeros(@(x)sin(x*pi), 0, 20, 7)
% Example 3: z = Nzeros(@(x)cos(x*pi), 0, 20, 7)
% Example 4: z = Nzeros(@(x)besselj(0,x) - 2*besselj(1,x), 0, 20, 7)
% Example 5: z = Nzeros(@(x)3*sin(2*x) - 2*cos(3*x), 0, 20, 7)

### Cite As

Lateef Adewale Kareem (2022). Nzeros(fun, xmin, xmax, N) (https://www.mathworks.com/matlabcentral/fileexchange/64844-nzeros-fun-xmin-xmax-n), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2012b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux