MATLAB: How to copy column vectors from a matrix into a cell array? I have some sensor data stored in a 1000 x 5 matrix. I'd like to copy each column into a 5 x 1 cell array such that each cell contains a 1000 x 1 vector. I tried the num2cell(mymatrixname,1) function, but this created a cell array of 1 x 5, not 5 x 1. Using MATLAB, how can I do this in a compact way - without using a for loop?
Thanks,
kilosaw
Transpose it
y = num2cell(x,1)';