The error function, also known as the Gauss error function, is widely used in mathematics, statistics, and engineering. In MATLAB, the error function is implemented as a built-in function erf(x)
.
To use the error function in MATLAB, simply pass a numeric scalar, vector, or matrix as the argument to erf()
.
main.m214 chars9 lines
Note that the output of erf()
will always be a numeric value between -1 and 1, indicating the probability of a normal distribution.
gistlibby LogSnag