MATLAB: I have four 1×50 matrices and I want to save them to one 4×50 matrix. How to do this

matrixmatrix manipulation

I have four 1×50 matrices and I want to save them to one 4×50 matrix. How can I do this?

Best Answer

for k=1:50
title{k}=sprintf('title%d',k)
end
a=rand(1,50);
b=rand(1,50);
c=rand(1,50);
d=rand(1,50);
M=[title;num2cell(a);num2cell(b);num2cell(c);num2cell(d)]