Imagine I have a series of different sized column vectors inside an array and want to group them into a matrix by padding the empty spaces with NaN
. How can I do this?
There is already an answer to a very similar problem (accumulate cells of different lengths into a matrix in MATLAB?) but that solution deals with row vectors and my problem is with column vectors. One possible solution could be transposing each of the array components and then applying the above mentioned solution. However, I have no idea how to do this.
Also, speed is a bit of an issue so if possible take that into consideration.