LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Array

Solved!
Go to solution

Hello.

I have a array and from which at some specific index i need to delete small portion of array like:

 

0 pass

1 pass

2 fail

3 fail

4 pass

5 fail

6 fail

no i have to delete  from above array, 1st three elements then two elemets and last remaing two elements which i am not able to do using delete array icon.

 

So if anyone can help me.

Thanks

0 Kudos
Message 1 of 19
(2,687 Views)

Here is the example

0 Kudos
Message 2 of 19
(2,682 Views)

Hi Pals,

 

When you say you want to delete part of  the array do you mean you know exactly which elements you want to remove? Or do you want to delete all the elements that fail?

 

Regards

David B
Applications Engineer
National Instruments UK
0 Kudos
Message 3 of 19
(2,675 Views)

Well, if you run your VI in highlight execution mode, you will probably see that it is not doing what you want from the get go.  Why are you wiring the start index and the length to the same value?  Have you looked at the help file dor the function and understand how it works?

 

In your example, your first pass will delete 4 elements from the array starting at index 4, so indices 4, 5, 6, and 7.  Your start indices and lengths probably need to be different values.  Next, the way you are doing it, realize that your starting indices will continue to change.  You will probably want to do it backwards, so the end of the array is changing, not the beginning.  Then, you won't need to dynamically modify the indeices.

0 Kudos
Message 4 of 19
(2,667 Views)

Hello All,

Yes i am too confused so i posted it... my wish is 1st four elemets should be deleted then next next four and then remaining elemets... These four elements wont be constant so some times 1st two elemets then 6 elements etc...

 

Hope i am clear now...

Thanks

0 Kudos
Message 5 of 19
(2,663 Views)

How are you determining which elements should be deleted?

0 Kudos
Message 6 of 19
(2,659 Views)

hello,

I have very long program, So from another vi i get the values which to delete.. I have just posted part where i got stucked.

 

so 4, 8 etc values i get from other vi.

Thanks a lot..

0 Kudos
Message 7 of 19
(2,652 Views)

So explain in detail what 4, 8, 12 mean.  If you tell me to delete the 4 four elements, then the next 8, then the next 12, that's the same as deleting the first 24 elements.  You have to have offsets defined and lengths.  So, starting at index 0, I want to delete 4 elements, then at index ? I want to delete 8 elements, and so on.

 

Unless you only want to delete one value from the array at those indices, you're missing ssome info.

0 Kudos
Message 8 of 19
(2,649 Views)

Hello,

Thanks so much,

 

So here i go... from 0 index i want to delete 4 elements (not 4th elemets) but from 0 index till 4 index, then from 5th index till 8th index and then from 9th index till 12th index as i need these groups which futher dealed separately and differently from each other.

 

Thanks

0 Kudos
Message 9 of 19
(2,647 Views)

Hello,

I want these small groups which i get after deleting so independentely i can work on these groups...

0 Kudos
Message 10 of 19
(2,645 Views)