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=erfs(z,N)
function v=erfs(z,N)
% v=erfs(z,N) evaluates the series expansion for the
% error function of  complex argument scaled by 
% exp(-abs(z)). The default value of N is 50.
if nargin<2, N=50; end
s=size(z); z2=z(:).^2; k=0:N;
v=(besseli(2*k+.5,z2,1)-besseli(2*k+1.5,z2,1))*(-1).^k';
v=reshape(v,s);

Contact us at files@mathworks.com