LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Darin.K

Array Subset by Start and Stop Indices

Status: New

One piece of code that I am tired of looking at is calculating start and length from start and stop indices for Array Subset.  I find that more often than not, I have start and stop indices as opposed to start and length.  I would like an option on the existing node to use start/stop, or even a new node if necessary. 

 

NewSubset.png

 

(If a new node is created, expandability would be nice)

5 Comments
X.
Trusted Enthusiast
Trusted Enthusiast

I checked a few projects I am working on: never would have needed that feature, as I always have to do some computation anyhow to find which end index I need, and oftentime, computation in terms of length is more natural than in terms of end index. But I understand that others may need it. Like some others will want to be able to define the last index and the length (to find the first index) or both indices from the end, etc, etc. More power to the users! Kudoed.

Darin.K
Trusted Enthusiast
Same thing for String Subset while we're at it. (of course array functions should simply accept strings as the byte arrays they are IMO)
altenbach
Knight of NI

> (of course array functions should simply accept strings as the byte arrays they are IMO).

 

That won't work that well in general. E.g. a "string size" on an N-dim array of strings gives an N-dim array of sizes while "array size" of the same data will give the N array dimensions.

 

Somewhat related, e.g. this idea might be appealing too.

Darin.K
Trusted Enthusiast
I should have made the preemptive strike and once again mention that I am referring to strings and not to string arrays. Still awaiting counterexample involving strings and not string arrays, but this is an aside.
GregSands
Active Participant

I had written an XNode to do this a little while ago, but only for 1D arrays, and without expandability.  I used to use this functionality, but since writing the XNode have scarcely needed it.  I agree it would be handy to have though.