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

15 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

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

Più risposte (2)

Matt J
Matt J il 18 Nov 2013
Modificato: Matt J il 18 Nov 2013
Perhaps you are thinking of
>> cell2mat(str)
ans =
thisisatestofcell2str
or maybe
>> char(str)
ans =
this
is
a
test
of
cell
2
str

Pascal Boulos
Pascal Boulos il 19 Ott 2018
>> join(str)
ans =
string
"this is a test of cell 2 str"
>> strjoin(str)
ans =
'this is a test of cell 2 str'

Categorie

Scopri di più su Cell Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by