Levenberg-Marquardt algorithm - sinus fit - low level 1D

Version 1.0.1 (3.03 KB) by Karol Vegso
I post the Levenberg-Marquardt algorithm for fitting sinusoidal function using only 1D representation of matrices.
11 Downloads
Updated 14 Aug 2023

View License

I post here the Levenberg-Marquardt algorithm for fitting sinusoidal function. The sinusiodal function is one of the basic non-linear functions. The sinusoidal function is frequently used in optics in interferometry or electronics. 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. The only difference from my previous posts in file exchange is that in this algorithm I am using matrix multiplication and matrix inversion on the matrices, which all of them are represented as 1D matrices. This was done as preparation to rewrite Matlab code to the C++ code using anly 1D arrays and for cycles. I demonstrate here that sometimes you can use Matlab for prototyping and later you can transfer low level algorithms from Matlab to C++.

Cite As

Karol Vegso (2026). Levenberg-Marquardt algorithm - sinus fit - low level 1D (https://www.mathworks.com/matlabcentral/fileexchange/133822-levenberg-marquardt-algorithm-sinus-fit-low-level-1d), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with any release
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.1

The clarity of explanation was improved.

1.0.0