Jump to content

Array of clusters and for loop


Recommended Posts

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

Link to comment

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?

post-9165-1242300401.jpg?width=400

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.