04-12-2013 06:01 AM
I have created a small VI that has to search 210000 data points.
Using a for loop, starting at the first point and selecting a sub array of the next 700 data points and then I return the minimum value from this subarray and I then write this value to a blank array (minimum number array) via a shift register. Next I move forward 1 point and create a new subarray from this data point forward 700 points and then return the minimum point from this subarray and write this value to the minimum number array via the shift register.
Once I have done this 210 000 times I then get the maximum number from my minimum number array.
This array takes 10 minutes to run, can I speed this up?
04-12-2013 06:12 AM - edited 04-12-2013 06:13 AM
04-12-2013 09:38 AM - edited 04-12-2013 09:38 AM
I was getting around 360-380ms from Gerd's code. I and getting around 350-375 with this code.
04-12-2013 10:26 AM
Hi,
You can save array comparisons if check the values with index i-1 and i+700.
Best Regards,
04-12-2013 01:16 PM
Instead of taking slices (sub arrays) of the original array to work on I thought you could take one initial slice and use smart indexing to replace the element as it loops.
I seem to be getting a consistant 168 on this version...