want to convert vector to cell
6 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
David Hill
on 27 Jul 2022
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 Comments
More Answers (0)
See Also
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!