LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

eliminating repetitive numbers

is there a way to transform a 1D array from, let s say, (0,0,1,1,3,4,4,4,4,5) to (0,1,3,4,5)
0 Kudos
Message 1 of 2
(2,788 Views)
Good question. I don't know of any fast method or built-in function.
When I had to do the same, I processed the array in a loop and copyed items in a new array only if different from the preceding one. If needed, I sorted the array before processing.
Let's see if anyone knows a faster and more efficient way...

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,788 Views)