08-10-2011 04:29 AM - edited 08-10-2011 04:36 AM
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.
Solved! Go to Solution.
08-10-2011 04:46 AM
Here you go!
Paul
08-10-2011 04:50 AM
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
08-10-2011 07:29 AM
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.
08-10-2011 07:35 AM
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
08-10-2011 07:37 AM
Here is an 8.0 version
08-10-2011 07:50 AM
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.
08-10-2011 08:44 AM
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.
08-10-2011 11:41 AM
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?
08-11-2011 01:53 AM
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