Jump to content

'For' loops truncating a 2D array


plneo

Recommended Posts

Hello everyone, I wonder if anyone can advise me what is happening in this VI? (Note that my VI is only partially completely for its purpose.)

I have an array that is generated outside the 'for' loop. All I want to do is to use the 'for' loop and get a subset of the externally-generated array. The 2 'for' loops are used to calculate the index of the required subset of the array.

However, when I do the wiring, it seems to be that the external for loop is truncating my 2D array into a 1D array. What is happening here? Is there any way I can pass in an externally-generated 2D array into the 'for' loops for subsequent processing?

Thanks.

Download File:post-5479-1154533521.vi

Link to comment
Hello everyone, I wonder if anyone can advise me what is happening in this VI? (Note that my VI is only partially completely for its purpose.)

I have an array that is generated outside the 'for' loop. All I want to do is to use the 'for' loop and get a subset of the externally-generated array. The 2 'for' loops are used to calculate the index of the required subset of the array.

However, when I do the wiring, it seems to be that the external for loop is truncating my 2D array into a 1D array. What is happening here? Is there any way I can pass in an externally-generated 2D array into the 'for' loops for subsequent processing?

Thanks.

Right click on the input terminal of the for loops ans disable auto-indexing this will stop the for loop from indexing the array at the input.

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
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.