Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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));

Akzeptierte Antwort

Star Strider
Star Strider am 3 Dez. 2017
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 Kommentare
Star Strider
Star Strider am 3 Dez. 2017
Please post your last Comment as a new Question. Then delete the Comment here.
Fareeha Yaseen
Fareeha Yaseen am 4 Dez. 2017
https://www.mathworks.com/matlabcentral/answers/370783-cannot-open-file-no-permission
Its posted here

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by