erfΒΆ

erf calculates the error function: \operatorname{erf}(x) = \frac{2}{\sqrt{\pi}}\int_{0}^x e^{-t^2}\,\mathrm dt.

y = erf(x)

Return Value

y is erf(x).

Parameters

x

x is a real vector.

Example

x = [-5:0.1:5];
y = erf(x);
plot(x, y);

History

Version Description
R2013.2 Documented.
5.50.2 New.

id-102502