MATLAB: Dimensions of matrices being concatenated are not consistent

errorMATLABmatricesstringvertcat

% How can I display the result in the following example. Not all time the strings are equals,
%but I need to display one below the other even at the end one even one is missing, it is possible?
c=[23;33;33;44;55;66;77;88;99;00;11;22;33;44];% 14 numbers



d=[23;33;33;44;55;66;77;88;34;00;11;44;33;44];% 14 numbers
e=[23;33;33;44;45;66;77;88;99;00;11;22;23;44];% 14 numbers
f=[23;33;33;44;53;66;77;88;99;04;11;22;33;44];% 14 numbers
g=[23;33;33;45;53;66;77;88;99;04;11;22;33;]; % as you can see this string is only 13 numbers
c=c';
d=d';
e=e';
f=f';
g=g';
result=[c;d;e;f;g];
Error:
Error using vertcat
Dimensions of matrices being concatenated are not consistent.
Error in Runscript (line 11)
result=[c;d;e;f;g];
%%I would like the result like in following picture below

Best Answer

You cannot have holes in a matrix so append NaN at the end. By the way you refer to them as string but in fact they are double array. But if they were string appending "" at the end of g would do it.