Converting 9 digit number into a string
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a (1675x 1) number matrix. Each numbers are 9 digit number. I want convert this no into string. When I am giving the num2str command it is giving me (1675 x 9) matrix, but I want to get a (1675 x 1) matrix. How can I do that?
댓글 수: 3
채택된 답변
Walter Roberson
2017년 4월 5일
Result = compose('%d', YourMatrix);
Otherwise you have to use a cell array if you want individual entries. For example,
Result = cellstr( int2str(YourMatrix) );
댓글 수: 2
Walter Roberson
2017년 4월 6일
You should be using cell2table() rather than array2table() so that you can combine values of different types.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!