Concatinate number and character

3 ビュー (過去 30 日間)
siddhesh rane
siddhesh rane 2013 年 7 月 25 日
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.

採用された回答

David Sanchez
David Sanchez 2013 年 7 月 25 日
my_char = 'A';
my_number = 50;
my_string = strcat(my_char,num2str(my_number));
  4 件のコメント
David Sanchez
David Sanchez 2013 年 7 月 25 日
% char(39) is apostrophe according to ASCII table, then:
str_with_apost = strcat(char(39), 'A50',char(39))
siddhesh rane
siddhesh rane 2013 年 7 月 25 日
its not working..what if i changed it from string to double?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by