07-20-2011 02:13 PM
Hey all,
I am trying to draw a line of best fit with the scattered points being displayed as well. I have attached my VI below and tried all sorts of methods,
but to no avail. I am aware that there is a 'liner fit.vi' which I tried, but it did not give me what I wanted. In fact the line wasn't best fit at all.
I hope someone could help me as I'm new to LabVIEW.
Thanks in advance!
Cheers,
Ruben
07-20-2011 02:42 PM - edited 07-20-2011 02:42 PM
Hi Ruben
The Linear Fit.vi should provide the results you require. Check the attachment for an edited version of your code. Does this solve your problem? You can check the help file for advice on using different fitting techniques, setting tolerances and weightings.
07-20-2011 02:47 PM
07-20-2011 02:52 PM
Here is what I would do.
07-20-2011 02:53 PM
And here is a version for 8.0
07-20-2011 02:59 PM
And to take it to the next level
07-20-2011 03:08 PM
Thanks Peter, it seems to work the way I want it to. I am designing this for an engine component
and may run into further problems as I go along. But thanks so much for this! Appreciate it!
Ruben
07-20-2011 03:09 PM
Hi Tim,
I seem to be unable to open your programme on LabVIEW 8.6. It appears like you have saved it in version 9.0
Could you try saving it in a lower version and post it again?
Thanks so much
Ruben
07-20-2011 03:10 PM
Did you look at my code? it is much clearner and easier to maintain.
07-20-2011 03:11 PM
This should be 8.0 version