File Exchange

image thumbnail

Fresnel integrals

version 1.0 (33.9 KB) by

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

7 Downloads

Updated

View License

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

Algorithm:
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

Comments and Ratings (7)

hossein

Very fast and accurate C file.
mexed it and used it..it 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

shao

shao (view profile)

it was a great help to my work!

Neo

Neo (view profile)

this rocks!!!! thanks for the prog

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.

vincent mulu

A Z

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

Timothy Chow

Seems to work great!

MATLAB Release
MATLAB 7.0.1 (R14SP1)
Acknowledgements

Inspired: FresnelS and FresnelC, Fresnel Integral

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

» Watch video