Hello to everyone,
is there anyone that can explain me how I can delete one of two (or plus) equal elements from an array, that is make sure that there are no equal elements in the array?
My code runs and doesn't run ( some of the equal elements are deleted and others not) and I don't understand why.. Can you help me?
Delete equal elements in an array
-
- beginner
- Сообщения: 24
- Зарегистрирован: 28 янв 2013, 14:47
- Версия LabVIEW: 2012
- Контактная информация:
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Delete equal elements in an array
There is an OpenG VI - remove duplicates from 1D array. It should work just fine.
Speaking about your code, you need either 2 loops, or something else that can substitute a loop (like search 1D array function)
Speaking about your code, you need either 2 loops, or something else that can substitute a loop (like search 1D array function)
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 24
- Зарегистрирован: 28 янв 2013, 14:47
- Версия LabVIEW: 2012
- Контактная информация:
-
- beginner
- Сообщения: 24
- Зарегистрирован: 28 янв 2013, 14:47
- Версия LabVIEW: 2012
- Контактная информация:
Re: Delete equal elements in an array
This is how i solved the issue, if the initial array is sorted in ascending order. What do you think about it?
The Vi that you suggested me, in the openG library, runs as well as my solution...
The Vi that you suggested me, in the openG library, runs as well as my solution...
- Вложения
-
- Delete duplicates from an 1D array.vi
- (16.32 КБ) 444 скачивания
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Delete equal elements in an array
It does not work. Try 1 2 3 4 5 3, your solution will not delete 2 3s.
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 24
- Зарегистрирован: 28 янв 2013, 14:47
- Версия LabVIEW: 2012
- Контактная информация:
Re: Delete equal elements in an array
Yes, because, as i wrote the array must be sorted in ascending order.
I've another question for you.
I don't understand why, at the end of the for loop, is the output array empty? Where do i do wrong?
Another time, thanks for youur help..
I've another question for you.
I don't understand why, at the end of the for loop, is the output array empty? Where do i do wrong?
Another time, thanks for youur help..
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
- 2 Ответы
- 503 Просмотры
-
Последнее сообщение Artem.spb
-
- 5 Ответы
- 273 Просмотры
-
Последнее сообщение AndreyDmitriev