MATLAB: Converting char array into string cells

arraycellcell arraysconvertMATLABstring

How can i convert my array into different string cells Array=[0, 1,3,0] I used Cells=cellstr(num2str(array) ) And i got 1×1 cell {'0 1 3 0' } I want my cell to be 1×4(or 1×any number) {'0','1','3','0'} Please help

Best Answer

This creates a 1x4 cell array
Array = [0, 1,3,0];
A = num2cell(Array);
C = cellfun(@num2str,A,'UniformOutput',false)
C = 1x4 cell array
{'0'} {'1'} {'3'} {'0'}