More About

Complementary Error Function

Tips

You can also find the standard normal probability
distribution using the Statistics and Machine
Learning Toolbox™ function normcdf. The relationship between the error
function erfc and normcdf is

normcdf(x)=(12)×erfc(−x2)

For expressions of the form 1 - erfc(x),
use the error function erf instead.
This substitution maintains accuracy. When erfc(x) is
close to 1, then 1 - erfc(x) is
a small number and might be rounded down to 0.
Instead, replace 1 - erfc(x) with erf(x).

For expressions of the form exp(x^2)*erfc(x),
use the scaled complementary error function erfcx instead.
This substitution maintains accuracy by avoiding roundoff errors for
large values of x.

Extended Capabilities

Tall ArraysCalculate with arrays that have more rows than fit in memory.

This function fully supports tall arrays. For
more information, see Tall Arrays.

C/C++ Code GenerationGenerate C and C++ code using MATLAB® Coder™.

Usage notes and limitations:

Strict single-precision calculations are not supported. In the generated code,
single-precision inputs produce single-precision outputs. However, variables inside the
function might be double-precision.