How to convert a matrix to a string array:
1 ビュー (過去 30 日間)
表示 古いコメント
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 件のコメント
採用された回答
その他の回答 (1 件)
Walter Roberson
2021 年 5 月 9 日
R=[1 2 1 3 2 3 1;1 1 2 1 2 2 3]
compose("A%d%d", R(1,:).', R(2,:).').'
参考
カテゴリ
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!