05-14-2020 10:10 AM
I am having a problem with for loop, as an example
for loop 1, output 3 values of 0,1,2
loop 2, output 3 values 3,4,5
....
loop n, output 3 values of n + 1, n + 2, n + 3
Do you have any ideas on how to do that with the for loop.
Thanks
Solved! Go to Solution.
05-14-2020 11:26 AM
There are many possibilities. For example you could do a 1D array three times longer, then reshape to three columns.
Another possibility is for example this:
05-14-2020 09:54 PM
Thanks for helping me, my problem has been solved.
05-15-2020 09:26 AM
Note also that my solution is what we call "scalable", meaning that very little change is needed to get a different number of columns, e.g. 0,1,2,3|4,5,6,7|8,... etc. The "3" diagram constant could even be made into a control and the entire code turned into a subVI with two inputs (# of rows, # of columns) and one output (2D array).