帮助中心帮助中心
逆补余误差函数
erfcinv(x)
示例
erfcinv(x) 为 x 的每个元素返回逆补余误差函数的值。对于 [0 2] 区间之外的输入,erfcinv 返回 NaN。当 x 接近 1 时,使用 erfcinv 函数替换包含 erfinv(1-x) 的表达式以提高准确性。
x
[0 2]
erfcinv
NaN
1
erfinv(1-x)
全部折叠
erfcinv(0.3)
ans = 0.7329
求向量元素的逆补余误差函数。
V = [-10 0 0.5 1.3 2 Inf]; erfcinv(V)
ans = 1×6 NaN Inf 0.4769 -0.2725 -Inf NaN
求矩阵元素的逆补余误差函数。
M = [0.1 1.2; 1 0.9]; erfcinv(M)
ans = 2×2 1.1631 -0.1791 0 0.0889
x 接近 0 时,您可以使用逆补余误差函数 erfcinv 替换 erfinv(1-x) 以避免舍入误差。
0
说明如何通过对 x = 1e-100 使用 erfcinv(x) 计算 erfinv(1-x) 来避免舍入。原始计算返回 Inf,而 erfcinv(x) 返回正确结果。
x = 1e-100
Inf
x = 1e-100; erfinv(1-x)
ans = Inf
ans = 15.0656
输入,指定为实数或实数的向量、矩阵、多维数组。x 不能是稀疏矩阵。
数据类型: single | double
single
double
逆补余误差函数 erfcinv(x) 定义为 erfcinv(erfc(x))=x.
您还可以通过使用函数 norminv (Statistics and Machine Learning Toolbox) 求标准逆正态概率分布。逆补余误差函数 erfcinv 和 norminv 之间的关系是
norminv
norminv(p)=(−2)×erfcinv(2p).
对于 erfcinv(1-x) 形式的表达式,请改用逆误差函数 erfinv。这一代换保证了准确性。x 接近 1 时,1 - x 是一个小数字并且可以向下四舍五入为 0。而是将 erfcinv(1-x) 替换为 erfinv(x)。
erfcinv(1-x)
erfinv
1 - x
erfinv(x)
此函数完全支持 tall 数组。有关详细信息,请参阅 tall 数组。
用法说明和限制:
不支持严格的单精度计算。在生成的代码中,单精度输入生成单精度输出。但是,函数内部的变量可能是双精度。
backgroundPool
ThreadPool
此函数完全支持基于线程的环境。有关详细信息,请参阅在基于线程的环境中运行 MATLAB 函数。
此函数完全支持 GPU 数组。有关详细信息,请参阅Run MATLAB Functions on a GPU (Parallel Computing Toolbox)。
此函数完全支持分布式数组。有关详细信息,请参阅Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox)。
在 R2006a 之前推出
erf | erfc | erfcx | erfinv
erf
erfc
erfcx
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office