09-02-2011 05:58 PM
Hello I have a program that uses an index array vi to output a subarray from the two dimension array
Attached is the VI.
Iam creating another 2 dimensional array and trying to use the same index array to output a subarray more like a a row of a matrix...
however when I click on the index array and wire the 1 dimensinal boolean array and it gives an error and says that I can wire 2 different data type..
the 2 dimensional array I have is in boolean and iam using an indexer to output one row of this boolean matrix-just trying to repeat the same process. but as I click on the index array icon, i just cant figure out how to change the output of the indexer to a 1 dimensional boolean array..
09-02-2011 06:26 PM
@SK0480 wrote:
the 2 dimensional array I have is in boolean and iam using an indexer to output one row of this boolean matrix-just trying to repeat the same process. but as I click on the index array icon, i just cant figure out how to change the output of the indexer to a 1 dimensional boolean array..
Please explain. Your index array outputs a 1D array. Isn't that what you want? Please attach the broken VI.
SK0480 wrote:however when I click on the index array and wire the 1 dimensinal boolean array and it gives an error and says that I can wire 2 different data type..
Please quote the entire error message verbatim.
09-02-2011 06:55 PM
The output will only be a 1D arra if you leave one of the indices disconnected. If you wire both indices, you get a single boolean, not an array.
Your entire codee is ridiculously complicated, for example how you do the incrementing/decrementing and how you use a greedy inner loop to start/stop the output. Why is the outer loop a FOR loop? Here's a quick attempt at some simplification of the logic. modify as needed.
09-02-2011 11:37 PM
09-03-2011 12:13 AM
We could solve it in five seconds if you would attach the broken code. Much more efficient than ambiguous words? 😄
Are you sure the 2D array is not turning into a 1D array due to autoindexing at the loop boundary, for example? Are you sure you have not wired both indices?