LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2d non-linear fit

I have a bunch of data, two independent variables and one dependent, and I have to fit them to a function z=f(x,y). The (x,y) data is unevenly distributed. Surfing the forum I have found solutions (derivations of lev-marq method)for data evenly distributed. Have anyone found a solution for this?

Manuel Vazquez
0 Kudos
Message 1 of 5
(3,557 Views)
The Lev-Mar functions can deal relatively easily with non-evenly spaced data.

I can't recall if the LV version does this, but modifying them to support this isn't so hard. There's no reason why a lev-Mar fit shouldn't be able to fir unevenly spaced data.

Do you mean 2-d as in a 2d data set, or 2d as in two independent variables on a 1-d data set?

hope this helps

Shane.

Message Edited by shoneill on 04-21-2005 01:56 PM

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 5
(3,554 Views)
Thanks Shoneill. Lev-marq library for Labview only deals with 1 dimensional data, y=f(x). Fits data to a line. I am looking for a non-linear fitting to a surface from data unevenly distributed. HiQ has a function that does this, but I need this for Labview....
0 Kudos
Message 3 of 5
(3,548 Views)
Yes, the stock Levenbert-Marquardt implementation only deals with 1D data.

General Levenberg-Marquardt does NOT care how your data is arranged in 2D, you simply need a way to generate a flat Z array as a function of your (x,y) input data pairs to be compared with the measured data arranged the same way.

Have a look at this recent example. (It basically makes a few trivial modifications to my earlier 2D fit example).

In my XuFit example, the x,y data pairs are sent to the model calculation as an interlaced array, but you could sent it in any other way as long as the model knows how to interpret it. For a more detailed discussion, have a look at my other commetns in the above threads. Good luck!
0 Kudos
Message 4 of 5
(3,542 Views)
I have tried it and it works!!!!! Thanks for your support and the examples
0 Kudos
Message 5 of 5
(3,519 Views)