LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

levenberg

I have a data set with a non-diagonal covariance matrix [s2].  The chi-square is then (y-yfit)^T[s2]^{-1}(y-yfit), where [s2]^{-1} is the weighting matrix--the inverse of the covariance matrix--and (y-yfit) is a column vector of fit residuals and (y-yfit)^T is the corresponding row vector.  As far as I know, solving for the parameters of yfit that minimize this chi-square should be pretty straightforward for this case.  One just has to allow for a weighting matrix instaed of a vector of weights and then properly use this matrix in the Levingberg-Marquardt algorithm.  Has anyone done a fit of this kind and have any suggestions?

0 Kudos
Message 1 of 4
(2,446 Views)

Hi,

 

I am not clear on what is the final LabVIEW question here. Are you wondering if this is possible in LabVIEW or are you hoping that someone has done it and maybe would like to share the code?

0 Kudos
Message 2 of 4
(2,385 Views)

Hi Miro,

 

I am hoping someone has done it already and would be willing to share the code.  I am working on the needed changes myself already, but the first try at it today came up short.  The "sum of three gaussians" example vi is my test case and it didn't do the fit correctly.  I will probably have to look at intermediate vectors and matrices in the two versions to see where I screwed up.


Regards,
Bob

0 Kudos
Message 3 of 4
(2,379 Views)

Hi

 

In this case i would recommend to do more searching in NI community forums. You should be able to find people who deal more closely with this type of computation. 

 

For example:

 

https://forums.ni.com/t5/LabVIEW/Levenberg-Marquardt-doesn-t-do-a-good-job-fitting/td-p/2130450

 

Good Luck!

0 Kudos
Message 4 of 4
(2,348 Views)