07-13-2011 01:58 PM
Hello,
I have a bit of code that I want to use to fit a curve and forcast the future points, but I can't make it work with the timestamp I need. Any help would be appreciated! Labview version is 2009 SP1.
07-13-2011 02:06 PM
From looking at the code (not trying it yet), I suggest you convert the timestamps to DBL instead of U32 and set the initial time to t=0 by subtracting the first element from the array.
07-13-2011 02:51 PM
changing to DBL was a good idea. Haven't gotten the rest working yet.
07-13-2011 03:38 PM
One of our engineers took pity on me and came up with this. Does just what I need. Thanks for looking at it Darin!
07-15-2011 09:57 AM - edited 07-15-2011 10:01 AM
07-15-2011 10:26 AM
OK, this code is pretty ridiculous, why would you need to loop and constantly compare to find the 0.6 threshold if you can calculate the corresponding time from first principles using the best fit values?
Here's a very quick draft showing some simplifications. Many more simplifications are definitely possible (I kept most of your code intact so far).
07-15-2011 10:28 AM
The sequence frames are temporary. I use them to keep the code organized and grouped by function while I am coding (the auto cleanup tool lays things out better with them). I'll delete them before final use.
I'll look at the loop. Right now I don't fully see how the removal wouldn't change it. (Homework, I guess.)
07-18-2011 08:39 AM
Thanks for the changes. I'll have to look that over. I don't understand this kind of math or stats at all. All new stuff.