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

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

采纳的回答

Doug Hull
Doug Hull 2013-11-18
There is no command cell2str in core MATLAB.

更多回答(2 个)

Matt J
Matt J 2013-11-18
编辑:Matt J 2013-11-18
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 2018-10-19
>> join(str)
ans =
string
"this is a test of cell 2 str"
>> strjoin(str)
ans =
'this is a test of cell 2 str'

类别

Help CenterFile Exchange 中查找有关 Cell Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by