erfc
Complementary error function
Syntax
Description
erfc( returns the Complementary Error Function evaluated
for each element of x)x. Use the erfc function
to replace 1 - erf(x) for greater accuracy when erf(x) is
close to 1.
Examples
Input Arguments
More About
Tips
You can also find the standard normal probability distribution using the function
normcdf(Statistics and Machine Learning Toolbox). The relationship between the error functionerfcandnormcdfisFor expressions of the form
1 - erfc(x), use the error functionerfinstead. This substitution maintains accuracy. Whenerfc(x)is close to1, then1 - erfc(x)is a small number and might be rounded down to0. Instead, replace1 - erfc(x)witherf(x).For expressions of the form
exp(x^2)*erfc(x), use the scaled complementary error functionerfcxinstead. This substitution maintains accuracy by avoiding roundoff errors for large values ofx.
Extended Capabilities
Version History
Introduced before R2006a
