01-25-2023 11:13 PM
Dear all, I have a set of 2D arrays (let's say 3, but the number can vary according to the experiment). My aim is to sequentially take the i-th column of each array and merge all of them in 3 new 2D arrays. This procedure has to be repeated for all columns of the 3 2D input arrays, as in the graph attached
Thank you very much
Mario
Solved! Go to Solution.
01-25-2023 11:32 PM
My initial idea is to use shift registers to input 2D array one by one (as their number can vary from experiment to experiment and are read from data files), then a nested FOR loop to pick up the columns and create the output 2D arrays. I made some tests, but it is a complete mess, so I got stuck and ask your help
Thanks
Mario
01-26-2023 01:40 AM - edited 01-26-2023 01:43 AM
If your input arrays have the same dimensions, you can pack them into 3D array.
See attached code. The result is also a 3D array.
01-26-2023 01:56 AM
thanks, it is an easier and faster solution than what I expected.
time to test it now