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

17 ビュー (過去 30 日間)
sermet
sermet 2013 年 11 月 18 日
コメント済み: Walter Roberson 2018 年 12 月 25 日
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.

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

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by