From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove 2D Array elements

Hello,

How could I remove a row or a column from 2D array?
How could I sort 2D matrix by two columns?


Deniss Karai
0 Kudos
Message 1 of 3
(2,544 Views)
Hi Deniss.
One way to do this is by splitting the array using Array Subset in two: one
from index 0 to index i-1, and one from index i to end. You will use only
one index, depending what do you want to remove: a row or a column. After
spliting, you must to rebuild the array, and the resulting array will have
one row (or column) removed. There may be another solutions, but it is the
one I use.
Regards,
Vlad
0 Kudos
Message 2 of 3
(2,544 Views)
Vlad Dragomir wrote:

> Hi Deniss.
> One way to do this is by splitting the array using Array Subset in two: one
> from index 0 to index i-1, and one from index i to end. You will use only
> one index, depending what do you want to remove: a row or a column. After
> spliting, you must to rebuild the array, and the resulting array will have
> one row (or column) removed. There may be another solutions, but it is the
> one I use.
> Regards,
> Vlad

Depending on what you want to do you can use the index array functions.
To retireve one row or column from of the use the index array function
and disable indexing on one terminal or the other.

To completely get ris of a row / colum you can use the resize array function.

Kevin Kent
0 Kudos
Message 3 of 3
(2,544 Views)