Error Function Code Matlab
Contents |
X = erfinv(Y) Inverse of the error function Definition The error function erf(X) is twice the integral of matlab error function definitions are not permitted in this context the Gaussian distribution with 0 mean and variance of:
TheMatlab Error Function Fit
complementary error function erfc(X) is defined as:
The scaled complementary error function erfcx(X) is defined inverse error function matlab as: For large X, erfcx(X) is approximately . Description Y = erf(X) returns the value of the error function for each element of real array complementary error function matlab X. Y = erfc(X) computes the value of the complementary error function. Y = erfcx(X) computes the value of the scaled complementary error function. X = erfinv(Y) returns the value of the inverse error function for each element of Y. The elements of Y must fall within the domain Examples erfinv(1)Plot Error Function Matlab
is Inf
erfinv(-1) is -Inf. For abs(Y) > 1, erfinv(Y) is NaN. Remarks The relationship between the error function and the standard normal probability distribution is: x = -5:0.1:5; standard_normal_cdf = (1 + (erf(x/sqrt(2))))./2; Algorithms For the error functions, the MATLAB code is a translation of a Fortran program by W. J. Cody, Argonne National Laboratory, NETLIB/SPECFUN, March 19, 1990. The main computation evaluates near-minimax rational approximations from [1]. For the inverse of the error function, rational approximations accurate to approximately six significant digits are used to generate an initial approximation, which is then improved to full accuracy by two steps of Newton's method. The M-file is easily modified to eliminate the Newton improvement. The resulting code is about three times faster in execution, but is considerably less accurate. References [1] Cody, W. J., "Rational Chebyshev Approximations for the Error Function," Math. Comp., pgs. 631-638, 1969 [ Previous | Help Desk | Next ]Search All Support Resources Support Documentation MathWorks Search MathWorks.com MathWorks Documentation complex error function matlab Support Documentation Toggle navigation Trial Software Product Updates Documentation matlab q function Home MATLAB Examples Functions Release Notes PDF Documentation Mathematics Elementary Math Special Functions
Matlab Gamma Function
MATLAB Functions erfc On this page Syntax Description Examples Find Complementary Error Function Find Bit Error Rate of Binary Phase-Shift Keying Avoid http://cens.ioc.ee/local/man/matlab/techdoc/ref/erf.html Roundoff Errors Using Complementary Error Function Input Arguments x More About Complementary Error Function Tall Array Support Tips See Also This is machine translation Translated by Mouse over text to see original. Click the button below to return to the English verison of the page. https://www.mathworks.com/help/matlab/ref/erfc.html Back to English × Translate This Page Select Language Bulgarian Catalan Chinese Simplified Chinese Traditional Czech Danish Dutch English Estonian Finnish French German Greek Haitian Creole Hindi Hmong Daw Hungarian Indonesian Italian Japanese Korean Latvian Lithuanian Malay Maltese Norwegian Polish Portuguese Romanian Russian Slovak Slovenian Spanish Swedish Thai Turkish Ukrainian Vietnamese Welsh MathWorks Machine Translation The automated translation of this page is provided by a general purpose third party translator tool. MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation. Translate erfcComplementary error functioncollapse all in page Syntaxerfc(x) exampleDescriptionexampleerfc(x
) returns the Complementary Error Function evaluated for each element of x. Use the erfc function to replace 1 - erf(x) for greater accuracy when erf(x) is close to 1.Examplescollapse allFind Complementary Error
X = erfinv(Y) Inverse of the error function Definition The error function erf(X) is twice the integral of http://cens.ioc.ee/local/man/matlab/techdoc/ref/erf.html the Gaussian distribution with 0 mean and variance of:
The http://www.obs.ujf-grenoble.fr/scci/logiciels/matlab61/help/techdoc/ref/erf.html complementary error function erfc(X) is defined as: The scaled complementary error function erfcx(X) is defined as: For large X, erfcx(X) is approximately . Description Y = erf(X) returns the value of the error function for each element of real array error function X. Y = erfc(X) computes the value of the complementary error function. Y = erfcx(X) computes the value of the scaled complementary error function. X = erfinv(Y) returns the value of the inverse error function for each element of Y. The elements of Y must fall within the domain Examples erfinv(1) error function matlab is Inf erfinv(-1) is -Inf. For abs(Y) > 1, erfinv(Y) is NaN. Remarks The relationship between the error function and the standard normal probability distribution is: x = -5:0.1:5; standard_normal_cdf = (1 + (erf(x/sqrt(2))))./2; Algorithms For the error functions, the MATLAB code is a translation of a Fortran program by W. J. Cody, Argonne National Laboratory, NETLIB/SPECFUN, March 19, 1990. The main computation evaluates near-minimax rational approximations from [1]. For the inverse of the error function, rational approximations accurate to approximately six significant digits are used to generate an initial approximation, which is then improved to full accuracy by two steps of Newton's method. The M-file is easily modified to eliminate the Newton improvement. The resulting code is about three times faster in execution, but is considerably less accurate. References [1] Cody, W. J., "Rational Chebyshev Approximations for the Error Function," Math. Comp., pgs. 631-638, 1969 [ Previous | Help Desk | Next ]= erfcinv(Y) Inverse complementary error function Definition The error function erf(X) is twice the integral of the Gaussian distribution with 0 mean and variance of . The complementary error function erfc(X) is defined as The scaled complementary error function erfcx(X) is defined as For large X, erfcx(X) is approximately Description Y = erf(X) returns the value of the error function for each element of real array X. Y = erfc(X) computes the value of the complementary error function. Y = erfcx(X) computes the value of the scaled complementary error function. X = erfinv(Y) returns the value of the inverse error function for each element of Y. Elements of Y must be in the interval [-1 1]. The function erfinv satisfies for and . X = erfcinv(Y) returns the value of the inverse of the complementary error function for each element of Y. Elements of Y must be in the interval [0 2]. The function erfcinv satisfies for and . Remarks The relationship between the complementary error function erfc and the standard normal probability distribution returned by the Statistics Toolbox function normcdf is The relationship between the inverse complementary error function erfcinv and the inverse standard normal probability distribution returned by the Statistics Toolbox function norminv is Examples erfinv(1) is Inf erfinv(-1) is -Inf. For abs(Y) > 1, erfinv(Y) is NaN. Algorithms For the error functions, the MATLAB code is a translation of a Fortran program by W. J. Cody, Argonne National Laboratory, NETLIB/SPECFUN, March 19, 1990. The main computation evaluates near-minimax rational approximations from [1]. For the inverse of the error function, rational approximations accurate to approximately six significant digits are used to generate an initial approximation, which is then improved to full accuracy by one step of Halley's method. References [1] Cody, W. J., "Rational Chebyshev Approximations for the Error Function," Math. Comp., pgs. 631-638, 1969 epserror