View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Fresnel integrals

5.0 | 6 ratings Rate this file 11 Downloads (last 30 days) File Size: 33.9 KB File ID: #6580 Version: 1.0

Fresnel integrals


Peter Volegov (view profile)


20 Dec 2004 (Updated )

Computes fresnel integrals with 1*10^-9 accuracy.

| Watch this File

File Information

MEX file to compute Fresnel integrals.
[C, S] = fcs(x) returns Fresnel integrals C ans S for argument x, x must be double and real.

F = fcs(x) returns complex F = C+i*S

This function uses an improved method for computing Fresnel integrals with an error of less then 1x10^-9, described in:
Klaus D. Mielenz, Computation of Fresnel Integrals. II
J. Res. Natl. Inst. Stand. Technol. 105, 589 (2000), pp 589-590
Notes for Linux implementation
Compile this with:
 mex -O fcs.c
Notes for Windows implementation
Compile this with:
 mex -O fcs.c -DWIN32


This file inspired Fresnel S And Fresnel C and Fresnel Integral.

MATLAB release MATLAB 7.0.1 (R14SP1)
Other requirements Windows, Linux
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
20 Jun 2014 hossein

Very fast and accurate C file.
mexed it and used is faster than other m files in Mathworks Database..maybe 10 times faster!

good thing is Matlab2014a added Fresnelc and Fresnels command but this little code you wrote works about 10 times or more faster than matlabs original command!

i recommend every one to use this code :)

very nice..thank you again

27 May 2011 shao

shao (view profile)

it was a great help to my work!

09 Feb 2010 Neo

Neo (view profile)

this rocks!!!! thanks for the prog

Comment only
17 Nov 2008 jose

jose (view profile)

Thanks for the program. It is great!
only fcs.c is needed. download it and compile with
>> mex fcs.c
(mine version is MATLAB2008b on WinXP SP2), so no -O or -DWIN32 options needed.
It will automatically generate fcs.mexw32.
The syntax of fcs.mexw32 file is documented in fcs.m which is nothing but an empty shell.

04 Apr 2007 vincent mulu

24 Feb 2007 A Z

Thanks for this program, it was a great help to my work!

13 Apr 2005 Timothy Chow

Seems to work great!

Contact us