MATLAB: Dimension of matrices being concatenanted is not consistent.. PLease hellp !!!

concatenation matrices

I want the end result to be a1 a2 a3… a10 …. aa1..a10 ..01…010
My code is :
letters=['a'; 'b'; 'c'; 'd'; 'e'; 'f'; 'g'; 'h'; 'i'; 'j'; 'k'; 'l'; 'm'; 'n'; 'o' ;'p'; 'q'; 'r'; 's'; 't' ; 'u' ;'v' ;'w'; 'x' ;'y'; 'z'; 'aa'; 'bb'; 'cc'; 'dd'; 'ee'; 'ff'; 'gg'; 'hh'; 'ii'; 'jj'; 'kk'; 'll'; 'mm'; 'nn'; 'oo'; 'pp'; 'qq'; 'rr'; 'ss'; 'tt'; 'uu'; 'vv'; 'ww'; 'xx'; 'yy'; 'zz'; '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'];
increment =1;
for y = 1 :1: 62
for k = 1 : 1 : 10
test = strcat(letters(y,:) , num2str(k));

Best Answer

I would use a cell array, that you can create by changing the square brackets [] by curly braces {}:
letters={'a'; 'b'; 'c'; 'd'; 'e'; 'f'; 'g'; 'h'; 'i'; 'j'; 'k'; 'l'; 'm'; 'n'; 'o' ;'p'; 'q'; 'r'; 's'; 't' ; 'u' ;'v' ;'w'; 'x' ;'y'; 'z'; 'aa'; 'bb'; 'cc'; 'dd'; 'ee'; 'ff'; 'gg'; 'hh'; 'ii'; 'jj'; 'kk'; 'll'; 'mm'; 'nn'; 'oo'; 'pp'; 'qq'; 'rr'; 'ss'; 'tt'; 'uu'; 'vv'; 'ww'; 'xx'; 'yy'; 'zz'; '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'};
See the documentation on Access Data in Cell Array (link) for details on how to work with it.