array of ints to cell array of strings?

조회 수: 2 (최근 30일)
Leor Greenberger
Leor Greenberger 2011년 10월 14일
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일
a=magic(5)
b=mat2cell(a,ones(size(a,1),1),ones(size(a,2),1))
c=cellfun(@num2str,b,'uni',false)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by