楼主: fantuanxiaot
11956 12

[源码分享] 误差函数导论与erfi函数的matlab编程(erf based on 2 papers and erfi matlab code) [推广有奖]

Ψ▄┳一大卫卍卐席尔瓦

大师

8%

还不是VIP/贵宾

-

威望
7
论坛币
-234475 个
通用积分
124.1424
学术水平
3783 点
热心指数
3819 点
信用等级
3454 点
经验
150207 点
帖子
7546
精华
32
在线时间
1327 小时
注册时间
2013-2-3
最后登录
2022-2-24

初级学术勋章 初级热心勋章 中级热心勋章 中级学术勋章 初级信用勋章 中级信用勋章 高级热心勋章 高级学术勋章 特级学术勋章 特级热心勋章 高级信用勋章 特级信用勋章

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
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篇关于误差函数的文献



本帖隐藏的内容

Rational Chebyshev approximations for the inverse of the error function.pdf (365.93 KB)


Rational Chebyshev Approximations for the Error Function.pdf (389.88 KB)





    由于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<xc).*gammainc(-x.^2,1/2))+...
    (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);







   







二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:matlab code MATLAB编程 MATLAB Papers atlab matlab

回帖推荐

Lnydi 发表于12楼  查看完整内容

终于找到关于误差函数的帖子了

davidwenli 发表于11楼  查看完整内容

非常需要,谢谢楼主

zbin7451f 发表于8楼  查看完整内容

交流在学习过程中非常重要!非常赞成!

zbin7451f 发表于7楼  查看完整内容

楼主最近发的几个资源好贴,必须大力顶啊!

离歌レ笑 发表于3楼  查看完整内容

求matlab 2014a 下载地址!
已有 2 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
zbin7451f + 100 + 100 + 5 + 5 + 5 对论坛有贡献
离歌レ笑 + 50 + 1 + 1 + 1 精彩帖子

总评分: 经验 + 100  论坛币 + 150  学术水平 + 6  热心指数 + 6  信用等级 + 6   查看全部评分

本帖被以下文库推荐

沙发
fantuanxiaot 发表于 2014-9-9 22:36:17 |只看作者 |坛友微信交流群
互相交流!!!!
已有 1 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
zbin7451f + 100 + 100 + 5 + 5 + 5 我很赞同

总评分: 经验 + 100  论坛币 + 100  学术水平 + 5  热心指数 + 5  信用等级 + 5   查看全部评分

使用道具

藤椅
离歌レ笑 在职认证  发表于 2014-9-9 22:51:12 |只看作者 |坛友微信交流群
fantuanxiaot 发表于 2014-9-9 22:36
互相交流!!!!
求matlab 2014a 下载地址!
已有 1 人评分论坛币 学术水平 热心指数 信用等级 收起 理由
fantuanxiaot + 5 + 2 + 5 + 2 精彩帖子

总评分: 论坛币 + 5  学术水平 + 2  热心指数 + 5  信用等级 + 2   查看全部评分

使用道具

板凳
fantuanxiaot 发表于 2014-9-9 22:57:36 |只看作者 |坛友微信交流群
离歌レ笑 发表于 2014-9-9 22:51
求matlab 2014a 下载地址!
http://www.ed2000.com/ShowFile.asp?FileID=515482
评论可以看https://bbs.pinggu.org/thread-3157394-1-1.html


已有 2 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
zbin7451f + 100 + 100 + 5 + 5 + 5 真实的帮助!
离歌レ笑 + 100 感谢!

总评分: 经验 + 100  论坛币 + 200  学术水平 + 5  热心指数 + 5  信用等级 + 5   查看全部评分

使用道具

报纸
fantuanxiaot 发表于 2014-9-9 23:02:34 |只看作者 |坛友微信交流群
离歌レ笑 发表于 2014-9-9 22:51
求matlab 2014a 下载地址!
我没有下载2014a 但是代码我是在

http://www.mathworks.cn/matlabce ... 18238-erfi-function

这里找到的
已有 1 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
zbin7451f + 100 + 100 + 5 + 5 + 5 对论坛贡献非常大!

总评分: 经验 + 100  论坛币 + 100  学术水平 + 5  热心指数 + 5  信用等级 + 5   查看全部评分

使用道具

地板
fantuanxiaot 发表于 2014-9-10 00:14:07 |只看作者 |坛友微信交流群
顶一个啦!!!!

使用道具

7
zbin7451f 发表于 2014-9-10 06:49:40 |只看作者 |坛友微信交流群
楼主最近发的几个资源好贴,必须大力顶啊!
已有 1 人评分论坛币 学术水平 热心指数 信用等级 收起 理由
fantuanxiaot + 5 + 1 + 1 + 1 精彩帖子

总评分: 论坛币 + 5  学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

使用道具

8
zbin7451f 发表于 2014-9-10 06:56:40 |只看作者 |坛友微信交流群
fantuanxiaot 发表于 2014-9-9 22:36
互相交流!!!!
交流在学习过程中非常重要!非常赞成!
已有 1 人评分论坛币 学术水平 热心指数 信用等级 收起 理由
fantuanxiaot + 5 + 1 + 1 + 1 精彩帖子

总评分: 论坛币 + 5  学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

使用道具

9
wlgmath 发表于 2014-9-10 20:14:52 |只看作者 |坛友微信交流群
向楼主学习MATLAB技术
已有 1 人评分论坛币 收起 理由
fantuanxiaot + 5 精彩帖子

总评分: 论坛币 + 5   查看全部评分

使用道具

10
fantuanxiaot 发表于 2014-9-10 20:34:39 |只看作者 |坛友微信交流群
wlgmath 发表于 2014-9-10 20:14
向楼主学习MATLAB技术
互相学习,小的才疏学浅

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jr
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-19 21:12