matlab误差函数作用,误差函数导论与erfi函数的matlab编程(erf based on 2 papers and erfi matlab code)... |
您所在的位置:网站首页 › erfi表示什么函数 › matlab误差函数作用,误差函数导论与erfi函数的matlab编程(erf based on 2 papers and erfi matlab code)... |
In mathematics, the error function (also called the Gauss error function) is a special function (non-elementary) of sigmoid shape that occurs in probability, statistics, and partial differential equations describing diffusion. It is defined as: The complementary error function, denoted erfc, is defined as Which also defines erfcx, the scaled complementary error function(which can be used instead of erfc to avoid arithmetic underflow). The imaginary error function, denoted erfi, is defined as
Where D(x) is the Dawson function (which can be used instead of erfi to avoid arithmetic overflow).When the error function is evaluated for arbitrary complex arguments z, the resulting complex error function is usually discussed in scaled form as the Faddeeva function: 2篇关于误差函数的文献 由于MATLAB的所有版本已经拥有erf、erfc及其逆函数的代码,但是只有R2014a才有erfi函数的代码,下面将给出erfi函数的MATLAB(R2014a)代码。本帖隐藏的内容function ans=erfi(x) % %erfi(x). The Imaginary error function, as it is defined in Mathematica % %erfi(z)==erf(iz)/i (z could be complex) using % %the incomplete gamma function in matlab: gammainc % %Using "@": erfi = @(x) real(-sqrt(-1).*sign(x).*gammainc(-x.^2,1/2)) % %Note: limit(x->0) erfi(x)/x -> 2/sqrt(pi) % % %Example 1: % x=linspace(0.001,6,100); % y=exp(-x.^2).*erfi(x)./2./x; % figure(1), clf;plot(x,y*sqrt(pi)) % % %Example 2: % [x,y]=meshgrid(linspace(-3,3,180),linspace(-3,3,180)); % z=x+i*y; % figure(1), clf;contourf(x,y,log(erfi(z))) % axis equal;axis off xc=5.7;%cut for asymptotic approximation (when x is real) ans=~isreal(x).*(-(sqrt(-x.^2)./(x+isreal(x))).*gammainc(-x.^2,1/2))+... isreal(x).*real(-sqrt(-1).*sign(x).*((x (x>=xc).*exp(x.^2)./x/sqrt(pi)); 其数值形式的MATLAB Code为 function f=erfi1(y) fun=inline('exp(x.^2)*2/sqrt(pi)','x'); f=quadl(fun,0,y); |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |