NI Home > Community > NI Discussion Forums

LabVIEW

Reply
Member
chrisharris
Posts: 30
0 Kudos

Remove data samples from an array

Hi All,

 

I am developing a VI which reads data, using the 'Read Data [Channel]' block, from a 'Open Data Storage [MATLAB]' block. There is a total of four channels and I have a very high number of data samples per channel which I am importing (order of millions). I wish to reduce this by only taking in every (n)th data point in each channel. Does anyone have any suggestions as to how this can be achieved? 

 

I am using LabVIEW 2011.

 

Thanks in advance for any help.

 

Chris

Trusted Enthusiast
Henrik_Volkers
Posts: 2,173
0 Kudos

Re: Remove data samples from an array

What you are looking for is the decimate vi.

In your case probably the

Decimate (continuous) VI

Owning Palette: Signal Operation VIs

Requires: Full Development System

Continuously decimates the input sequence X by the decimating factor and the averaging Boolean control. Wire data to the X input to determine the polymorphic instance to use or manually select the instance.

 

Read your data in blocks , pass it through the decimate vi and work with the reduced data.

If you are not directly storing the smaller data blocks, try to allocate the data arrays first and use the inplace structure  to avoid to run out of memory due to continous memory reallocation of the increasing array.

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'