07-16-2014 08:32 AM
I want the opinion of others as to the best way to approach this situation.
Is there a way to tell if a line is straight using LabVIEW function? Can you provide an example?
I have attached four images of results I am getting. The straighter the line is, the better the result are.
Image A is good and mean the test should pass.
Image b is kinda bad.
Image C is bad.
Image D is very bad.
Thanks!!
07-16-2014 08:35 AM
Hey,
you could calculate the slope from the some datapoints and then check if all following datapoints are within a specific range around the calculated "ideal" curve.
Regards,
CMW...
07-16-2014 08:45 AM - edited 07-16-2014 08:46 AM
Hi finger,
The straighter the line is, the better the result are.
Then you need to define a "number of quality" to express that straightness!
Some thoughts:
- You can use a polynomial regression function on your data (using atleast order 2). When the square/higher term(s) exceed a limit the line isn't straight enough…
- In your image(s) you don't define the Y scale as linear or logarithmic. That might be of interest here…
- From your "good, bad, and ugly" description it seems you want a "straight" line to be flat (meaning a slope around zero). Is that what you want?
07-16-2014 08:59 AM
Start with Help>> Find examples and look into "Robust linear fit.vi"
Once you've done that you may have already answered your own question.... Or you may have found some new questions to ask. But, do try starting there.