How to convert a matrix to a string array:
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a matrix:
R=[1 2 1 3 2 3 1;1 1 2 1 2 2 3];
that i want to convert to:
Q=["A11","A21","A12","A31","A22","A32","A13"];
How can I do that?
Appreciated!
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 9 Mai 2021
"A" + R(1,:)' + R(2,:)'
4 Kommentare
Walter Roberson
am 10 Mai 2021
cell2mat(arrayfun(@(s)sscanf(s, "%*c%1d%1d"),Q,'UniformOutput',false)).'
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!