R = erfc(X)
| Parameter | Description |
|---|---|
| X | a real single or real double scalar, vector, matrix, or multidimensional array. Sparse and complex inputs are not supported. |
| Parameter | Description |
|---|---|
| R | complementary error function values, returned with the same size and floating-point class as X. |
erfc computes the complementary error function element by element.
The complementary error function is defined as:
$$erfc(x) = \frac{2}{\sqrt{\pi}}\int_x^{\infty} e^{-t^2}\,dt$$It is related to the error function by:
$$erfc(x) = 1 - erf(x)$$Use erfc instead of 1 - erf(x) when erf(x) is close to 1, because direct subtraction can lose significant digits.
Use erfcx instead of exp(x^2) * erfc(x) for large positive values of X.
R = erfc(0.35)
V = [-0.5 0 1 0.72];
R = erfc(V)
M = [0.29 -0.11; 3.1 -2.9];
R = erfc(M)
A = 1 - erf(10);
B = erfc(10);
| Version | Description |
|---|---|
| 1.17.0 | initial version |