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?

 採用された回答

Doug Hull
Doug Hull 2013 年 11 月 18 日

0 投票

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 日

2 投票

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 日

0 投票

>> 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.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

タグ

質問済み:

2013 年 11 月 18 日

コメント済み:

2018 年 12 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by