kramp(z)
w=kramp(z) is the Faddeeva function or kramp function, which also is used for calculating
the plasma dispersion. The Faddeeva or Kramp function is defined as:
w(z)=exp(-z^2)erfcx(z)
where erfcx(z)=erfc(-iz) which is the complex complementary error function.
This code can keep the accuracy typically at at least 13 significant digits in both the real and imaginary parts for the faddeeva ro kramp function by comparing with the results of mathematica. This algorithm is based on the work:
Mofreh R. Zaghloul and Ahmed N. Ali, "Algorithm 916: Computing the Faddeyeva and Voigt Functions," ACM Trans. Math. Soft. 38 (2), 15 (2011).
Cite As
wang qing (2024). kramp(z) (https://www.mathworks.com/matlabcentral/fileexchange/50665-kramp-z), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.3.0.0 | This code is Ok! |
||
1.2.0.0 | modifyed this code suitable for any dimensional matrix z;. n=20+max(ceil(abs(x/a)) is changed by : x1=x(:);n=20+max(ceil(abs(x/a))),here x is in z(z=x+iy). |
|
|
1.1.0.0 | There are some errors in this previous code. Now I haved modfied them so that it give the correct and accurate result of Faddeeva function in x<<1 and y>>1(z=x+iy)。 |
|
|
1.0.0.0 |
|