LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
danil33

Usage of Delete From Array Function

Hi All,

         As we know "Delete From Array Function". Deletes an element or subarray from n-dim array and returns the edited array.

         Suppose we are working with a 1D array,and we have to delete the first and the last array index elements.The only way is to use "Delete From Array Function" twice like this:-

    Iam proposing an idea that using a single "Delete From Array Function" we can do what ever deletions we want,This can be apply only in the case of 1D arrays.In a single Delete From Array Function we can enter what ever index numbers that we want to delete.                                                                                                                                                                                                                                                         

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
11 Comments
crossrulz
Knight of NI

Something like this?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
danil33
Active Participant

Yes....but a VI as Jim Kring said is not available in the function pallete.That is why I shared that idea.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
crossrulz
Knight of NI

I'm calling yours a duplicate idea.  Kudos the other idea if you like it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
altenbach
Knight of NI

> I am proposing an idea that using a single "Delete From Array Function" we can do what ever deletions we want,This can be apply only in the case of 1D arrays.

 

You don't really say how you want to specify multiple deletions. (The other idea is more well defined, giving an array of indices, and maybe an array of sizes). Are you thinking of a resizeable node?

 

It would be better if you could create a picture of the suggested solution. We already know how the existing functions look like! 😉

 

Also note that your example shown can be very confusing, because deletions are not commutative. For example if you delete the first element first, the last element will have a different index than what it had before the first delete operation. Swapping your two delete operations will usually give a different result. Sequential deletions should typically carried out in descending order to maintain some sanity. :D. However as soon as we need to delete more than a few segments, there are much better algorithms available.

 

Delete from array is a rarely needed function, and if we need it it is typically only a single operation. I don't think we need to overload the current function with more modes.

 

danil33
Active Participant

Actually my idea is,suppose we have an array containing certain  data,but before displaying it as output we have to remove the first and the last array indices,if we have a readymade VI,then it will be easy that we can specify the particular array indices and the output array contains the remaining elements only........Pnt's idea is great but I think not to create an array just to create a constant containing that particular array element and just wire it with the corresponding node in the readymade VI that's all.Anyway thanks for feedbacks.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
Dragis
Active Participant

Am I missing anything, or can we close this idea as a duplicate of Pnt's?

altenbach
Knight of NI

I still don't understand's danil33's description at all (especially in the last post, where he tries to explain why this idea is different). Thus, I cannot tell if it is a duplicate or not.

crossrulz
Knight of NI

Yeah, danil33's last post made me more confused and therefore more convinced this is a duplicate.

 

danil33, if you like the other idea, give it kudos.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
danil33
Active Participant

Ok.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
Dragis
Active Participant

Thanks all for the input. I will mark this idea as a duplicate of the original so there is no more confusion. 

 

danil33, if you feel your idea isn't a duplicate, feel free to start a new idea with a more thorough description including how it is different from the others.