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

1 次查看(过去 30 天)
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));

采纳的回答

Star Strider
Star Strider 2017-12-3
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.
  5 个评论
Fareeha Yaseen
Fareeha Yaseen 2017-12-4
https://www.mathworks.com/matlabcentral/answers/370783-cannot-open-file-no-permission
Its posted here

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by