Mourad Posted May 15, 2009 Report Share Posted May 15, 2009 Hi all, Just a question. I have array of clusters contains 5 clusters (3 elements each cluster) and I read all elements via for loop one by one and I have a stand alone array contains 5 elements. my question is how can I merge that array of elements to the array of clusters to be just array of clusters (4 elements each cluster) and able to read all via for loop?? Thanks in advance Quote Link to comment
Cat Posted May 15, 2009 Report Share Posted May 15, 2009 Is this what you're trying to do? Download File:post-9165-1242300412.vi Just a note -- It's generally considered Bad Form to autoindex a for loop with more than one array. If they are different lengths the loop will stop at the end of the shorter array. Only do this if you know that ALL arrays will ALWAYS be the same length. Cat Quote Link to comment
Mourad Posted May 19, 2009 Author Report Share Posted May 19, 2009 It seems nice solution, I thought it might be something without FOR loop I can use, so in that case I can use only FOR loop to merge and after that I can use the main FOR loop, I think to use two arrays as index to a FOR loop is not that good idea or? Yes all arrays are same length. Thanks for your reply QUOTE (Cat @ May 14 2009, 01:31 PM) Is this what you're trying to do? Download File:post-9165-1242300412.vi Just a note -- It's generally considered Bad Form to autoindex a for loop with more than one array. If they are different lengths the loop will stop at the end of the shorter array. Only do this if you know that ALL arrays will ALWAYS be the same length. Cat Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.