Contents Previous Next Subchapters

The Error Function
Syntax erf(x)
See Also erfc , cnormal , ierf

Description
Returns an element-by-element approximation of the error function, where x is a real or double-precision matrix.

The error function is defined by
                        x     2
                  2    /    -t
     erf(x) = -------- |  e    dt
              sqrt(pi) /
                        0

Example
     ginit
     x = 0. : .1 : 3. 
     gtitle("Error Function")
     gplot(x, erf(x))

returns the following plot: