array of ints to cell array of strings?

4 visualizaciones (últimos 30 días)
Leor Greenberger
Leor Greenberger el 14 de Oct. de 2011
I was wondering what is the best way to convert an array of integers to a cell array of strings?
Thanks.

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 14 de Oct. de 2011
a=magic(5)
b=mat2cell(a,ones(size(a,1),1),ones(size(a,2),1))
c=cellfun(@num2str,b,'uni',false)

Más respuestas (0)

Categorías

Más información sobre Data Types en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by