LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linearity Calc

I am using PXI6251 card to acquire data from a 0-5V sensor. Is there a built-in function/ VI to calculate the linearity of the data acquired? I

0 Kudos
Message 1 of 6
(3,399 Views)

What exactly do you want to know? If it is a linear signal what you receive from your daq device, or the parameters of linarity?

 

Christian

0 Kudos
Message 2 of 6
(3,391 Views)
It is a linear signal (w.r.t time)
0 Kudos
Message 3 of 6
(3,385 Views)

Ok, so you acquire a linear signal. And what "linearity information" do you want to get out of it?

I think of y = k*x+d 

 

Christian

0 Kudos
Message 4 of 6
(3,358 Views)
What you may be able to do is take the data you collect and fit a linear regression line to it.  Do an R-squared calculation on it and that will tell you how well the linear line fit to your data.  Generally values closer to 1 indicate the data fits very well to the linear line calculated.  It's a good place to start looking...
0 Kudos
Message 5 of 6
(3,341 Views)
Bingo! I have to calculate the linearity error of the signal I have acquired. I already have the data in CSV format. Using MS excel, I have even fitted a straight line to the data. But the calculation of linearity error is tiresome. Is there a function as such, in LabVIEW which will enable me to calculate the linearity error ? (I know that a regression line can be fit to a set of data- I want to calculate linearity error).
0 Kudos
Message 6 of 6
(3,322 Views)