LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Arrays

I have two one dimensional arrays. One array is one point shorter than
the other. When I add them
LabVIEW truncates the answer to an array which is the smaller of the
two. I thought it may
leave the last point unchanged?

Tom
0 Kudos
Message 1 of 3
(2,994 Views)
The size of the output array is the same size as the smallest input array. If you want to create an output array the same size as the largest, first create a 2D array by using the Build Array function. then if you use the Index Array on each row, you'll have created 1D arrays of the same size. In a numeric array, zero's are inserted into the previously empty rows.
Message 2 of 3
(2,994 Views)
You could probably also use the reshape array function to resize the shorter array to the same length as the larger one before doing the addition...


Michael Aivaliotis
VI Shots LLC
0 Kudos
Message 3 of 3
(2,994 Views)