Nr2 = double(Letter)-'A'+1
Letter refer to number
2 次查看(过去 30 天)
显示 更早的评论
I did use A B C D E F ... for 1 2 3 4 5 6 .... with the following code:
Nr=[1 2 3 4 5 6];
Letter=char(Nr+'A'-1);
Letter =
ABCDEF
But now i want to get back the originals number instead of the corresponding letters (Nr is not avaible anymore).
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!