No BSD License  

Highlights from
Error function of complex numbers

4.6

4.6 | 5 ratings Rate this file 30 Downloads (last 30 days) File Size: 59.37 KB File ID: #18312

Error function of complex numbers

by Marcel Leutenegger

 

14 Jan 2008 (Updated 14 Jan 2008)

Extend the error function to the complex plane.

| Watch this File

File Information
Description

This package contains two MATLAB functions e=ERF(r) and e=ERFZ(z)} as MEX-files for Windows. ERF overloads the default MATLAB error function of real-valued numbers with a much faster implementation. ERFZ enhances ERF to evaluate the error function of complex numbers too. If called with real numbers, it is identical to ERF and equally fast. ERFZ can replace ERF if no error message is required when called with complex numbers. For compatibility with operating systems other than Windows on x86 processors, ERFZ is egally implemented as a normal M-file, which relies upon the default ERF by MATLAB.

Implementation details are found in the attached PDF manual.

MATLAB release MATLAB 6.1 (R12.1)
Other requirements x86 Windows platform (MEX-files); none (M-file).
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
18 Jan 2008 Per Sundqvist

Well I don't know about the speed of your routines but I guess its ok. As you maby have seen I submitted "erfi" using matlabs internal function gammainc (which runs in fortran speed). By a simple substitution one could alternatively get:

erf(z)=i*erfi(-i*z)

since my function covers the general complex case. The intermediate case for asymptotic and medium value of z, has perhaps to be improved I admitt.

24 Jan 2008 A Asheim

Works fine.
I use this for a wide range of parameters, then Per's implemetation is no good(NaN for large values). I have not checked why. When speed is not an issue I would recommend this(Marcels) implementation.

16 Feb 2008 Bora Ung

Works well. Speedwise, this implementation seems to be on par with Godfrey's (file ID: 3574) which I currently use for small to medium range of the complex argument. It would be interesting to compare the accuracy and range of both implementations.

23 Nov 2011 Felix

Works Great, Thank you

11 Mar 2012 Zeqë

How could I use the code if I have the R2010b version?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
error function Marcel Leutenegger 22 Oct 2008 09:42:37
numerical evaluation Marcel Leutenegger 22 Oct 2008 09:42:37
mathematics Marcel Leutenegger 22 Oct 2008 09:42:37
erf Marcel Leutenegger 22 Oct 2008 09:42:37
erf Juergen 12 May 2011 08:04:55
error function Juergen 12 May 2011 08:05:01
error function Kimmo 20 Mar 2012 06:40:17
erf Kimmo 20 Mar 2012 06:40:20
erf Gil An 20 Mar 2012 20:43:04

Contact us at files@mathworks.com