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

조회 수: 21(최근 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.
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 12월 25일
And string objects did not exist in MATLAB until R2016b.

댓글을 달려면 로그인하십시오.

추가 답변(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'
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 12월 25일
Note that string objects did not exist before R2016b.

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by