LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting repeated elements from a 2D array

I am trying to eliminate repeated elements (consecutive) from a 2-D array. I have tried using a for loop to check each value against the previous element. However, I am not sure how to prevent it from entering a null value in place of the removed elements. Any suggestions?
0 Kudos
Message 1 of 2
(2,712 Views)
Since you have 2 dimensions in a 2D array, the concept of "consecutive" is meaningless for elements except for the special case where one of the dimensions is 1.

All colums (or rows) must have equal length, it is thus not possible to just arbitrarily remove elements. The best you can do is replace individual elements with NaN.

Could it be you want to eliminate entire repeated columns or rows? This would make a bit more sense. Please post an example to clarify your problem.
0 Kudos
Message 2 of 2
(2,710 Views)