.. highlightlang:: us .. index:: erf .. _erf: erf === .. us.tag erf NOTREADYENGLISH math-spec-fun New5502 :ref:`erf` calculates the error function: :math:`\operatorname{erf}(x) = \frac{2}{\sqrt{\pi}}\int_{0}^x e^{-t^2}\,\mathrm dt`. .. function:: y = erf(x) .. us.return **Return Value** *y* is erf(x). .. us.params **Parameters** .. uparam:: x *x* is a real vector. .. us.example **Example** :: x = [-5:0.1:5]; y = erf(x); plot(x, y); .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013.2 - Documented. * - 5.50.2 - New. .. seealso:: :ref:`overview-mathematic` :sub:`id-102502`