LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete duplicate in a array

Solved!
Go to solution

hello,

 

i'm a student and i want to know how to delete duplicate in an array.

I explain i have an array and i want to delete all the value which appears more than one time.

you can see an exanple in attachment, with some explanation.

i use labview 8.5, and if someone can help it will be great.

And escuse me for my english, i'm french and i don't speak english very well.

 

Download All
Message 1 of 23
(22,289 Views)

Here you go!

 

Paul

Message 2 of 23
(22,274 Views)

hello,

 

i have already test this VI but my problem is that i have a 2D array and it doesn't work.

i want to use the first line for deleting the other.

i don't know i you see my problem

 

thanks

0 Kudos
Message 3 of 23
(22,268 Views)

Here is a 2D version. You will have to keep in mind if one array is longer than the other that the array will automaticlly add zero to the array to make it the same length.

Tim
GHSP
Message 4 of 23
(22,244 Views)

hello,

 

Thanks for responding aeastet but i can't open the VI, i think it's because i use the 8.5 version of labview.

can you change your version?

 

thanks

0 Kudos
Message 5 of 23
(22,237 Views)

Here is an 8.0 version

Tim
GHSP
0 Kudos
Message 6 of 23
(22,231 Views)

thanks i can read it, and it works but my problem is a little bit more difficult.

I will explain with a small exemple:

if I have a 8 in the first row and in the second row not a the same possition, i want to delete the 8 in the second row but keep the first 8.

In fact with my program, i know that there is no duplicate number in the row.

 

0 Kudos
Message 7 of 23
(22,229 Views)

aeastet,

there is a problem with your program when there are zero it shifts everything. And the problem is that If there is a zero at the begining my array is not the good one.

I check a way to get around the problem.

0 Kudos
Message 8 of 23
(22,210 Views)

In order to get a new 2D array with different size arrays inside you are going to have to use strings to do your evaluation. If you convert it back to a number you will see the zeros in the arrays that are not the same length. Is it OK to use strings?

Tim
GHSP
0 Kudos
Message 9 of 23
(22,199 Views)

i think i can be ok, in fact as i find number at the end it's ok. after that i use this numbers with an other VI.

But the purpose of this is to delete all the value witch is the same. I want to compare all values to the first and if there is indentical value she is deleted. And we do the same with the second value and so on. But i don't arrive to implement this program.

thanks 

0 Kudos
Message 10 of 23
(22,177 Views)