LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete from array

Solved!
Go to solution

Hello

 

I have array which have some index

 

0- Verify SN

1- SIM ID

2- EMPTY

3- IMEI ID

4- EMPTY

5- RF0 LOOPBACK

 

I want to delete the  EMPTY indext which is 2 and 4 ,

 

I bulid some vi but I get some of the value

0- Verify SN

1- SIM ID

2- IMEI

 

But the last index RF0 LOOPBACK I didn't get

 

what I am doing wrong

 

thanks

 

ohh please I am using labview 2009

 

 

 

0 Kudos
Message 1 of 6
(4,187 Views)
Solution
Accepted by Elyan_wisam

your vi does not removes empty fields also. Check this ( little dirty )

 

 

0 Kudos
Message 2 of 6
(4,172 Views)

It is not clear from your description if you want to remove Array elements that are "empty strings" or the ones that contain the word "EMPTY".

 

Here are two solutions (LabVIEW 9.0), one for each scenario. Modify as needed.

 

 

Download All
0 Kudos
Message 3 of 6
(4,133 Views)

wow....

Christian , I gave almost the same solution but now after your solution i can  see that the almost was rube.

0 Kudos
Message 4 of 6
(4,109 Views)

Thanks  alot

0 Kudos
Message 5 of 6
(4,105 Views)

@Neos wrote:

wow....

Christian , I gave almost the same solution but now after your solution i can  see that the almost was rube.


Well, you said it's "a little dirty" 😄

 

One potential improvement would be something like in my April 2005 post for a similar problem: If you index the element inside the loop, no extra copy of the input array needs to be made (see also this old example). A disadvantage is more code ("array size" and "index array"). For small arrays it does not really matter and the simpler code is probably preferred.

0 Kudos
Message 6 of 6
(4,083 Views)