フィルターのクリア

How do I add a string to a cell?

98 ビュー (過去 30 日間)
John
John 2015 年 10 月 28 日
コメント済み: John 2015 年 10 月 28 日
I have a 1x4 cell array containing strings, that I got using [num,txt]=xlsread(...). Now I would like to add another string, so that it becomes a 1x5 cell array, so that I can use it as column legends for a 5x5 numeric array that I will export with xlswrite. How can I add that string?

採用された回答

Thorsten
Thorsten 2015 年 10 月 28 日
C{1,5} = 'newstring';
  1 件のコメント
John
John 2015 年 10 月 28 日
Thanks

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

その他の回答 (1 件)

Jan
Jan 2015 年 10 月 28 日
C{end + 1} = 'newstring';
Or:
C = cat(2, C, {'newstring'}); % Less efficient
  1 件のコメント
John
John 2015 年 10 月 28 日
Thanks

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by