array of ints to cell array of strings?

1 次查看(过去 30 天)
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