11-18-2011 01:35 PM
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?
11-18-2011 01:46 PM
Post this to the idea exchange. Sounds like a feature I could have used as well.
11-18-2011 01:55 PM
You can find a set of VIs that does this in OpenG. It still loops through the array, but at least you are not constantly writing for loops to do it.
11-18-2011 02:24 PM
OK I've posted this to the idea exchange. Let's keep our fingers crossed...
11-18-2011 02:50 PM
You forgot the link.
11-18-2011 02:54 PM
Thanks.