Undefined function 'cell2str' for input arguments of type 'cell'.

str = {'this' 'is' 'a' 'test' 'of' 'cell' '2' 'str'};
str=cell2str(str)
Undefined function 'cell2str' for input arguments of type 'cell'
%I got this error.
%How can I transform any character of cell to strings?

 Respuesta aceptada

Doug Hull
Doug Hull el 18 de Nov. de 2013
There is no command cell2str in core MATLAB.

Más respuestas (2)

Matt J
Matt J el 18 de Nov. de 2013
Editada: Matt J el 18 de Nov. de 2013
Perhaps you are thinking of
>> cell2mat(str)
ans =
thisisatestofcell2str
or maybe
>> char(str)
ans =
this
is
a
test
of
cell
2
str
>> join(str)
ans =
string
"this is a test of cell 2 str"
>> strjoin(str)
ans =
'this is a test of cell 2 str'

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 18 de Nov. de 2013

Comentada:

el 25 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by