Scilab-Branch-6.1-GIT
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
dawson
Compute the Dawson (scaled imaginary error) function.
Syntax
y = dawson(z)
Arguments
- z
- vector or matrix of real or complex numbers
- y
- vector or matrix of real or complex numbers (of same size than x).
Description
dawson
computes the scaled imaginary error function, defined as
Examples
i = %i; x = [0, 0.01, 1, 100, i, 2*i, 4*i, 8*i, 1-i, 1+i, 2+i, 1e-4+2e-4*i].'; [x, dawson(x), dawson(-x)]
--> [x, dawson(x), dawson(-x)] ans = 0. + 0.i 0. + 0.i 0. + 0.i 0.01 + 0.i 0.0099993 + 0.i -0.0099993 + 0.i 1. + 0.i 0.5380795 + 0.i -0.5380795 + 0.i 100. + 0.i 0.0050003 + 0.i -0.0050003 + 0.i 0. + i 0. + 2.0300785i 0. - 2.0300785i 0. + 2.i 0. + 48.160012i 0. - 48.160012i 0. + 4.i 0. + 7875110.3i 0. - 7875110.3i 0. + 8.i 0. + 5.526D+27i 0. - 5.526D+27i 1. - i 0.9903731 + 0.6388731i -0.9903731 - 0.6388731i 1. + i 0.9903731 - 0.6388731i -0.9903731 + 0.6388731i 2. + i 0.1635394 - 0.1531246i -0.1635394 + 0.1531246i 0.0001 + 0.0002i 0.0001 + 0.0002i -0.0001 - 0.0002i
clf subplot(1,2,1) x = logspace(-20,20,100); y = dawson(x); // the imaginary part is zero plot("ll", x, y) xlabel x fontsize 3 title dawson(x) fontsize 3.5 xgrid(color("grey60")) subplot(1,2,2) x = logspace(-7,1,100); y = imag(dawson(x*%i)); // the real part is zero plot("ll", x, y) xlabel x fontsize 3 title imag(dawson(x.i)) fontsize 3.5 xgrid(color("grey60"))
Algorithms
This function is based on the Faddeeva package library.
History
Versão | Descrição |
5.5.0 | Function dawson introduced |
Report an issue | ||
<< calerf | Funções Especiais | delip >> |