Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - English


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

Dawson(z)=exp(-z^2).erfi(z).√π /2

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.

See also

  • erf — The error function.
  • erfc — The complementary error function.
  • calerf — computes error functions.

History

VersionDescription
5.5.0 Function dawson introduced
Report an issue
<< calerf Special Functions delip >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 24 11:13:09 CEST 2024