Hi, often I would love to index an array with an array of indexes or an array of booleans without having to loop it. I.e: let the IndexArray function accept an array of indexes instead of discrete indexes. The output should then be an array of indexes values. Another use case is to index with an array of booleans, so each TRUE element would index the input array and FALSE elements are not indexed.
arrResult = arrInput[ arrIndexes ]; or
arrResult = arrInput[ arrVal > 20 ];
Would this be useful? Possibly it could be implemented in future versions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Duplicate of http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-booleans-for-array-indexing/idi-p/1309062