display words in a matrix

I need help I trying to display the 12 months in a 6x2 matrix then display them in a 6x2 in alphabetical order please help

 Accepted Answer

out = reshape(sort(cellstr(datestr(datenum([zeros(12,1) (1:12).' ones(12,1)]),'mmm'))),2,[]);
please read about functions: reshape,sort,cellstr,datestr,datenum

2 Comments

i got the moonths into a 12x1 but i am having trouble getting them to a 6x2
I got it thank you

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!