Concatinate number and character
1 次查看(过去 30 天)
显示 更早的评论
I have numerical data in cell and i want to add character before that numerical data how can i do it ?
Suppose i have numerical value 50 in particular position in cell i want to make it A50.
Thanks in advance.
0 个评论
采纳的回答
David Sanchez
2013-7-25
my_char = 'A';
my_number = 50;
my_string = strcat(my_char,num2str(my_number));
4 个评论
David Sanchez
2013-7-25
% char(39) is apostrophe according to ASCII table, then:
str_with_apost = strcat(char(39), 'A50',char(39))
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!