Levenberg–Marquardt algorithm - sinusoidal function

Version 1.0.0 (2.33 KB) by Karol Vegso
Here, I post a low-level Levenberg–Marquardt algorithm for fitting sinusoidal function.
22 Downloads
Updated 4 Feb 2022

View License

The sinusiodal function is one of the basic non-linear functions. The sinusoidal function is frequently used in optics in interferometry or electronics. To know the low-level algorithm for fitting sinusoidal function can be very useful in X-ray Talbot interferometry or grating interferometry. Here, I post Levenberg–Marquardt algorithm for fitting simple sinusoidal function. The study material and detail explanation of algorithm is posted by Technical University of Denmark by Madsen, Nielsen and Tingleff on the web-page <http://www2.imm.dtu.dk/pubdb/edoc/imm3215.pdf>. The presented algorithm fits amplitude, phase and offset of sinusoidal function.
In X-ray Talbot or grating interferometry, the fringe scanning method is used for measurement of differential-phase image. In this technique, you collect for example 5 images for 5 different equally stepped grating positions. Then, in each image pixel, you have 5 intensity values, which follow sinusoidal function. You can fit each pixel of your image with sinusoidal function and calculate phase for each pixel. If you do that for image corresponding to the sample and image corresponding to the background, you can subtract phase image for background from phase image for sample and calculate differential phase image. However, you should be aware that to implement fitting in X-ray grating interferometry, you also need to use GPU programming or CUDA.

Cite As

Karol Vegso (2024). Levenberg–Marquardt algorithm - sinusoidal function (https://www.mathworks.com/matlabcentral/fileexchange/106165-levenberg-marquardt-algorithm-sinusoidal-function), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with R2018a to R2021b
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0