want to convert vector to cell
5 次查看(过去 30 天)
显示 更早的评论
i am dealing with a colum vectror A= [1 2 2 3 2 ]
need to convert this vector in a cell form with element seprated by commas A ={ '1','2','2','3','2'}
0 个评论
采纳的回答
David Hill
2022-7-27
A= [1 2 2 3 2 ]
B=mat2cell(num2str(A'),ones(1,length(A)),1)'
Which is the same as:
C ={ '1','2','2','3','2'}
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!