02-05-2012 09:57 AM
I want to change the order of a 1D array based on another 1D array which specifies the order. For example, I have an array which has the following items: 12, 13, 14, 15, 16. And I have another 1D array which specifies an order of 3, 4, 0, 1, 2. I want the resulting array to be 15, 16, 12, 13, 14. How do I do this? This should be really easy. Another example, I'm given an array in the following order 1,2,3,4,5,6,7 and I have a order specifying array containing 0,6,1,5,2,3,4. Therefore, the resulting array should be 1,7,2,6,3,4,5. ???
Solved! Go to Solution.
02-05-2012 10:38 AM
This is, in fact, pretty easy. Put an "Index Array" inside a for loop and wire the two arrays into it. Disabled auto-indexing on the input array. Wire the array element to the border of the for loop and you'll have the desired array.
02-05-2012 11:03 AM
Beautiful! Thanks
02-05-2012 01:23 PM
You should mark Nathan's message as the solution to your question to give him credit since he was the one who told you how to do it. First, you'll need to unmark your thank you post as the solution by going to the options menu to the upper right of your message.
02-06-2012 06:34 AM - edited 02-06-2012 06:35 AM
Okay, Done.