Decimate 1D Array Function Returns Empty Output Arrays

Updated Jun 15, 2018

Reported In

Software

  • LabVIEW

Issue Details

I'm trying to split my array into several sub-arrays using the Decimate 1D Array VI in LabVIEW. When I do so, the outputs from the VI end up empty, as shown in the images below.

Why is the Decimate 1D Array function not decimating my array?
 

Solution

This can happen when you have more output arrays than elements to divide. For example, if you decimate a 5 element array into 6 output arrays.
Try reducing the number of output arrays until it is less than or equal to the number of elements in the input array. In the above example, you would need 5 or fewer output arrays to see the result you expect.

 

Additional Information

The Decimate 1D Array function is designed to take a single array and split it into several arrays. These resulting arrays, however, will always be of equal length to each other. If the original elements cannot be split evenly, the leftover elements are left unused. You can find more information about this in the VI's help page.

For example, if your original array contains 6 elements, and you split them into 3 sub-arrays, each of the resulting sub-arrays will contain 2 elements.
 

Split them into 4 sub-arrays, however, and you would end up with sub-arrays of uneven length. The Decimate 1D Array function handles this by removing the last two elements to be assigned, leaving each of your output arrays with a length of 1.
 

WAS THIS ARTICLE HELPFUL?

Not Helpful