LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Efficient way of searching interval in 1d-array?

Here's a quick draft for the counting in a sliding window (LV 8.0).
 
 
(I am still not quite sure what output you want. If you just want the max in each channel, keep the current max and its index in a shift register and compare (and possibly updated) at each iteration. No need to create the 2D array.)

Message Edited by altenbach on 06-21-2007 09:12 AM

Download All
Message 11 of 12
(551 Views)

Thanks you very much!

 This is exactly what I had in mind. Sorry for the unclear description of the problem in my first post. I don`t want to show my implementation after seeing your code.. I have tried it, and it works very well. I used the code in your previous post in the 0-case to count the first interval.

I made a testfile with a record size of 360000 samples, and 5 records. The counting took less than 10 seconds on my PC with 360000 samples interval size (6 minutes). In my application this data corresponds to 5 hours sampling at 10ms sample rate, and record size of 1 hour. I made a larger file corresponding to 24 hour of data, but I have to read the data in chunks to be able to process it.

0 Kudos
Message 12 of 12
(519 Views)