How to perform a minimization between two spectra using a nonlinear least square function?

1 view (last 30 days)
Dear All,
I have two spectra together for comparison and I want to minimize the difference between them. The solver of the objective function is nonliear least square (in this filed, Levenberg-Marquardt is the best method). Here is the graph dipecting the simulated and measured data. The data is attached and here is the lines that call them:
load Observed.txt;
load Measured.txt;
The way I understand it is that a nonlinear least square provides me with the best fit. How does someone generate the fit? Please execuse my ingnorance over this issue as I am stumbling with it for the past month and I am realy keen to understand it. I am using this data to get familiar and really understand the minimization concept and how is it implemented in Matlab so that I can apply it in the rest of the data.
Thank you very much for the help, guidance and time in advance

Answers (0)

Community Treasure Hunt

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

Start Hunting!