06-01-2007 09:40 AM
06-01-2007 09:55 AM
Hei Hasqual,
your vi lacks a subvi it seems.
about the polynomial fit: look at the help (right click on the icon -> help).
you should plug the polynmomial order, if you want different than 2.
try the several boxing (algorithm) possibilities LV gives you for fitting. when using only 3 data points for poly order 2, this might be critical.
check using an indicator that indeed 3 params get into the subvi.
use an independant fit to check validity of your data (eg Excel or Origin).
wire the error output to see if it did not return any error.
display data and fit on graph.
good luck
06-01-2007 10:03 AM
Yeah, I'm an idiot and forgot to attach it the sub-vi ... so here it is also. I actually did try to replicate the fit in Excel and got "other" bogus data (I don't always trust Excel as I've run into problems with their fitting before). I did try a couple other algorithms other than the basic one, but always used an order of 2 as it seems that it'd be good. Actually, in the Excel fit, the fitted line looked great, but when I plugged the equation they reported into the spreadsheet, the results weren't at all what the graph "said" it should be. If that makes sense ... I plotted the data, fit a line and the equation returned did not fit the line it was supposed to fit. Anyways, if this can lend any insight, that'd be great, sorry for the hassle and thanks for the help!
~Jack
06-01-2007 11:38 AM
You're doing a mindbogling amount of confusing wiring. Do you really read the same file with each subVI call? Why?
What are typical inputs?
Why don't you place indicators on the two arrays going to the polyfit VI, run the VI with typical data, turn the new indicators into constants and delete everything else before the polyfit call. Now we can test with real, typical data wthout having to deal with all the mess before that. 🙂
You should also wire the error out of the fit VI, maybe it wants to tell you something interesting. 😉
I doubt the problem is with the polynomial fit.
06-01-2007 12:06 PM - edited 06-01-2007 12:06 PM
Message Edited by hasqual on 06-01-2007 12:07 PM
06-01-2007 12:20 PM - edited 06-01-2007 12:20 PM
Just show more significant digits and you'll see that the results are the same.
Message Edited by altenbach on 06-01-2007 10:21 AM
06-01-2007 01:55 PM
06-01-2007 04:27 PM - edited 06-01-2007 04:27 PM
Message Edited by altenbach on 06-01-2007 02:30 PM