Concatinate number and character
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
David Sanchez
il 25 Lug 2013
my_char = 'A';
my_number = 50;
my_string = strcat(my_char,num2str(my_number));
4 Commenti
David Sanchez
il 25 Lug 2013
% char(39) is apostrophe according to ASCII table, then:
str_with_apost = strcat(char(39), 'A50',char(39))
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Environment and Settings in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!