convert string array to cell in MATLAB

Posted by Maddy on Stack Overflow See other posts from Stack Overflow or by Maddy
Published on 2010-12-30T16:10:27Z Indexed on 2010/12/30 16:53 UTC
Read the original article Hit count: 146

Filed under:

I need to output a cell to an excel file. Before this I need to convert a date column of integers to datestrings. I know how to do this, but I am not able to put this new string array back into the cell -

mycell = { 'AIR' [780] [1] [734472] [0.01] ; ...
           'ABC' [780] [1] [734472] [0.02]}

I did this -->

dates = datestr(cell2mat(mycell(:,4))) ;

What I need as an answer is:

{'AIR' [780] [1] '14-Dec-2010' [0.01] ;
 'ABC' [780] [1] '23-Dec-2010' [0.03] ; }

so that I can now send it to an excel file using xlswrite.m

© Stack Overflow or respective owner

Related posts about matlab