LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fitting points with LabView

Solved!
Go to solution

Hello,

I have two arrays with two sets of points. I need to fit them with two straight lines. I know that the two lines are parallel, so I want to use that information in the fit. There is a way to fit the two lines at the same time and force the two lienear coefficients (slope) to be the same? With the intercept different for the two lines. Does anyone have a suggestion on how to do that?

 

Thanks for the help 🙂

Please let me know if the question is not clear.

 

Ps. I tried to use Linear fit, but it can fit only one set of points at a time and clearly the slopes are different for the two sets of points. 

0 Kudos
Message 1 of 3
(2,959 Views)
Solution
Accepted by topic author DanMad

the general linear fit is what you need: Read the Help and a math book 😄

I attached a demo .. you have two lines with same slope but different 'offset'

I was lasy and didn't used a offset free noise .... but play for yourself 😉

 

fitparallel.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 3
(2,929 Views)

Hi,

Thanks for the answer. The example was useful. The help of labview is not too clear on that function.

 

Cheers,

Dan

0 Kudos
Message 3 of 3
(2,902 Views)