adding to a cell array

1 回表示 (過去 30 日間)
Jason
Jason 2011 年 7 月 23 日
If I have a cell array of numbers, is it possible to append to this another cell array that consists of text. The text cell array is only 1 column and I simply want to append this column to the leftmost side of the number cell array.
Thanks

採用された回答

Walter Roberson
Walter Roberson 2011 年 7 月 23 日
Sure.
[TextCellArray(:), NumericCellArray]
For example,
t = {'hello','Jason'};
n = {1, 2, 3; 4, 5, 6};
[t(:),n]
The result will be
'hello' [1] [2] [3]
'Jason' [4] [5] [6]
  1 件のコメント
Jason
Jason 2011 年 7 月 23 日
Thank you very much!
Jason

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by