how i cab convert numbers into letters

4 次查看(过去 30 天)
hello all how i can convert number which are stored in cell array in alphabet?
numbers12 = [3,6,12,1,1,3,26,20]
lettter={,,,,,}

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2015-6-2
numbers12 ={3,6,12,1,1,3,26,20}
lettter=cellfun(@num2str,numbers12,'un',0)
  1 个评论
Stephen23
Stephen23 2015-6-2
编辑:Stephen23 2015-6-2
As the question gives a numeric vector, then arrayfun will also work:
>> X = [3,6,12,1,1,3,26,20];
>> arrayfun(@num2str,X,'un',0)
ans =
'3' '6' '12' '1' '1' '3' '26' '20'

请先登录,再进行评论。

更多回答(1 个)

Shrirang
Shrirang 2015-6-2
Hi , You can use num2str command. e.g. numbers12 = num2str(numbers12 ) so your number array in char Hope this helps you.

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by