LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Padding of Concatenating Inputs in build array function?

When using the build array function block and de-selecting the Concatenate Inputs is it possible to easily remove the padding that gets added to a 2D array to make the lengths equal? For example if a 1D array of {1,2,3,4,5} is entered it would be outputted as a 2D array of [{1,2,0} {3,4,5}] is it possible to have the ouput as [{1,2} {3,4,5}] with different lengths?
0 Kudos
Message 1 of 5
(2,950 Views)

An array of strings will allow different length strings.

Generally when I am faced with a 2-d structure and the "recatangular" req of the 2-d array hurts, I'll try to restructure the data as an array of clusters and within the clusters, I can can place 1-d arrays.

I have absolutely no idea if that helps,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 5
(2,947 Views)
Hi smackheadj,
different lengths in an array are not possible, but you can use for example an array of cluster of array.

Mike

Message Edited by MikeS81 on 05-12-2008 07:12 PM
Message 3 of 5
(2,945 Views)


smackheadj wrote:
For example if a 1D array of {1,2,3,4,5} is entered it would be outputted as a 2D array of [{1,2,0} {3,4,5}] is it possible to have the ouput as [{1,2} {3,4,5}] with different lengths?


No.  they will be the same length, thus padding.
Message 4 of 5
(2,935 Views)
Thanks guys i'll try changing it to an array of strings
0 Kudos
Message 5 of 5
(2,929 Views)