Code covered by the BSD License  

Highlights from
complexzeros

from complexzeros by Howard Wilson
Complex zeros of a function of z=x+i*y are computed using graphics and Muller's method.

v=fresnels(z,N)
function v=fresnels(z,N)
% v=fresnels(z,N) sums the Bessel series expansion of 
% the Fresnel sine integral. N+1 terms are used in
% the series with a default value of N=100. 
if nargin<2, N=100; end
s=size(z); z=pi/2*z(:).^2; n=1.5+2*(0:N);
v=sum(besselj(n,z),2);
v=reshape(v,s);

Contact us at files@mathworks.com