array of ints to cell array of strings?

I was wondering what is the best way to convert an array of integers to a cell array of strings?
Thanks.

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 10월 14일

0 개 추천

a=magic(5)
b=mat2cell(a,ones(size(a,1),1),ones(size(a,2),1))
c=cellfun(@num2str,b,'uni',false)

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by