LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Levenberg-Marquardt problem

hello
i want to fit my data with Levenberg-Marquardt function with a gaussian function model.
here is my vi ,, I ve got the error 20041 (singular matrix)
 
can you help me?
0 Kudos
Message 1 of 4
(3,178 Views)
Your model function only uses 2 parameters (look!), but you give initial estimates for 10 parameters. These sizes must match!
 
Also, you should always call the same model function by reference using the initial guesses so you can see if they are reasonable. Do you know reasonable initial guesses?
 
(Also note that you can delete the FOR loop in your model calculation without any change in result).
0 Kudos
Message 2 of 4
(3,168 Views)
OK, everything is wrong. 😞 Here is the right way to do it.
 
In addition to the above mentioned problem, your function misses one parameter, the ampltude. (you only use position and width). Attached is a fixed version. You need a function with three parameters and an array with three elements for the initial guess of the parametres.
 
Now the fit works just fine. The best fit is [Amplidude=~100, position=~1000, width=~3.2] 🙂
 
Let me know i you have any questions.
 

Message Edited by altenbach on 01-29-2007 01:29 PM

Download All
0 Kudos
Message 3 of 4
(3,163 Views)
Thanks a lot for your quick response, you have made an excellent job.
Everything was wrongSmiley Happy
 
Best regards
 
merci pour tout
Bonjour de la Guadeloupe!
0 Kudos
Message 4 of 4
(3,142 Views)