Fresnel integrals

Calculates FresnelC, FresnelS integrals and their variations (C_1, C_2 and S_1 and S_2)
2.5K Downloads
Updated 29 Oct 2008

View License

FRESNEL(X) calculates the values of the Fresnel integrals for real values of vector X,
i.e.
C = \int_0^x cos(pi*t^2/2) dt, (0a)
S = \int_0^x sin(pi*t^2/2) dt (0b)
Also, it evaluates the following variations of the Fresnel integrals
C1 = \sqrt(2/pi) \int_0^x cos(t^2) dt, (1a)
S1 = \sqrt(2/pi) \int_0^x sin(t^2) dt (1b)
and
C2 = \sqrt(1/2/pi) \int_0^x cos(t) / \sqrt(t) dt, (2a)
S2 = \sqrt(1/2/pi) \int_0^x sin(t) / \sqrt(t) dt (2b)

The integrals are calculated as follows:
- Values of X in the interval [-5,5] are looked up in Table 7.7 in [1] and interpolated ('cubic'), if necessary. This table has values of the Fresnel integrals with 7 significant digits and even linear interpolation gives an error of no more than 3e-004.
- Values outside the interval [-5,5] are evaluated using the approximations under Table 7.7 in [1]. The error is less than
3e-007.

NOTE: The Tables were OCR'ed and although thoroughly checked, there might be some mistakes. Please let me know if you find any.

REFERENCE
[1] Abramowitz, M. and Stegun, I. A. (Eds.). "Error Function and Fresnel Integrals." Ch. 7 in "Handbook of mathematical functions with formulas, Graphs, and mathematical tables", 9th printing. New York: Dover, pp. 295-329, 1970.

EXAMPLES OF USAGE
>> Y = fresnel(X,'c');
returns the Fresnel C integral according to eq. (0a)
>> Y = fresnel(X,'s',2);
returns the Fresnel S integral values according to eq. (2b)
>> [C,S] = fresnel(X,[],1)
returns the both the Fresnel C and S integral values according to eqs. (1a), (1b)
>> [C,S] = fresnel(X,[])
returns the both the Fresnel C and S integral values according to eqs. (0a), (0b)

Cite As

Christos Saragiotis (2024). Fresnel integrals (https://www.mathworks.com/matlabcentral/fileexchange/20052-fresnel-integrals), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Interpolation in Help Center and MATLAB Answers
Acknowledgements

Inspired: FresnelS and FresnelC

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

Corrected the OCR typos mentioned by Peter Volegov (thanks, Peter, for taking the time) and three or four others as well. I checked it with some other relevant functions and it seems to be working OK now (differences are of the order of 1e-8).

1.0.0.0