LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete a repeating element from an array

How do I delete a repeating element from a string array. I know the element but don't know the indices of this element in that array.............

Please help me................

0 Kudos
Message 1 of 13
(3,412 Views)

You question is not quite clear. These are three different solutions: select what do you need.

 

 

Untitled2.png

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 2 of 13
(3,394 Views)

I have a 2d array of strings. There are lots of blank string constants are present in that array. I want to delete all of these blank string constants and make the array smaller with others string data.......

0 Kudos
Message 3 of 13
(3,382 Views)

There are many a times the very same question was asked, please make a search before you post. This is one of the method to remove empty elements.

 

RemoveEmptyElement.png

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 13
(3,370 Views)

please upload the vi.......

0 Kudos
Message 5 of 13
(3,356 Views)

P@Anand a écrit :

There are many a times the very same question was asked, please make a search before you post. This is one of the method to remove empty elements.

 

RemoveEmptyElement.png


This will not work because the conditional terminal is true when the string is empty, so it will only add empty strings. You need to invert the output of the empty string function.

 

Also, all the rows of the array need to have the same number of items so some elements will be filled with the default string value: an empty string.

 

Ben64

0 Kudos
Message 6 of 13
(3,349 Views)
Thanks Ben for pointing me out, I missed the Not operator.
Anyway you cannot restrict the array filling with empty strings at the end if the arrays are of different size.
-----

The best solution is the one you find it by yourself
0 Kudos
Message 7 of 13
(3,333 Views)

please upload the vi

0 Kudos
Message 8 of 13
(3,331 Views)

Drag that picture to your block diagram.  It's a snippet.  The code will populate in your vi.

 

Also, it would have been much quicker to just rewrite the 5 functions they posted than waiting that long for a new post.

0 Kudos
Message 9 of 13
(3,315 Views)

actually I donot know how to add the condition in the for loop..i.e. the question mark type thing in that for loop..........please help me............

 

0 Kudos
Message 10 of 13
(3,299 Views)