Concatinate number and character
조회 수: 3 (최근 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에서 Environment and Settings에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!