LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

curve fitting in case of vertical AND horizontal error bars

Hello, before posting my question here, I have been reading lots of posts with topic related to curve fitting. Now I understand that (which info is missing from the LV2012 help!), the Weight input for the Y values can be calculated in the following way:

 

Weight = 1 / standarddeviation ^2

 

Lets take the "General linear fit.VI" as an example. Here we have an input for the "Weight" double array. So we can convert our STDEV values (coming from a real measurement, as error of the Y values).

My question is that, how to deal with a case, when I have error for the X values too (horizontal error bars)? How can I do fitting?

thanks for advice!

0 Kudos
Message 1 of 2
(2,692 Views)

As I see, there is no VI implemented to do such fitting. However, I have found a nice solution, including citations to physics journals with the algorithm details.

Also, an Excel table. The code has GNU public licence:

http://vizsage.com/other/leastsquaresexcel/

 

just for your info, if someone looking for an algorithm...

0 Kudos
Message 2 of 2
(2,629 Views)