# LabVIEW

cancel
Showing results for
Did you mean:

Highlighted

## Split a 2D array

How can I split a 2D array in order to filter a signal? one column is the signal and the other one is the channel, and I´m filtering 18 channels.
Message 1 of 5
(14,109 Views)
Highlighted

## Re: Split a 2D array

If you have 18 channels "one column is the signal and the other one is the channel" does not make sense. Do you mean one dimension is the signal and one dimension is the channel, forming an "18 by X" array?

To obtain a certain row or a certain column as 1D array, use index array and leave one of the indices unwired. This will give you one row or one column, respectively.

LabVIEW Champion. It all comes together in GCentral
Message 2 of 5
(14,109 Views)
Highlighted

## Re: Split a 2D array

Sounds to me like he has a 2D array as such:
Row/Col Col 1(signal) Col 2(channel)
Row 1 3.009 1
Row 2 4.239 2
Row 3 1.100 3

In this case, the first dimension is the row dimension, and the second dimension is the column dimension. When the second dim is 0, all the rows contain signal info, when the second dim is 1, all the rows contain channel numbers.
You can split the 2D array into two 1D arrays. Row numbers between the two 1D arrays would still match signal data to channel number. So to make a 1D array of all rows in one column using the Index Array function, leave the first dim unwired (all rows), and wire the second dim (0 for signal, 1 for channel number).
- tbob

Inventor of the WORM Global
Message 3 of 5
(14,109 Views)
Highlighted

## Re: Split a 2D array

Splitting the signal works great.  Thanks.  I need to recombine the signals though after processing them individually.  What function can I use for this?
Message 4 of 5
(13,494 Views)
Highlighted

duplicate post