I have a simple question but I can\'t figure it out or find it anywhere. I have a cell array where c{1} is a vector and c{2} is a vector but of different lengths, up to c{i
This depends on whether the vectors in c are row or column vectors. But usually the fastest and most compact ways are:
c={[1 2 3], [4 5 6 7 8], [9 10]} cell2mat(c) cat(2, c{:})
or
c={[1 2 3]', [4 5 6 7 8]', [9 10]'} % cell2mat(c) % Doesn't work. cat(1, c{:})
so personally, I prefer cat.