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!