フィルターのクリア

appending a column to a cell array

65 ビュー (過去 30 日間)
gmltn1212
gmltn1212 2020 年 7 月 4 日
回答済み: Voss 2020 年 7 月 4 日
Hi I am trying to append a column to an existing cell array also with an additional header...
addthis = {1;2;3;4;5}
addheader = 'third col'
tothis = {'first col' 'second col'; 0, 0; 0, 0; 0, 0; 0, 0; 0, 0}
I want to return this
added = {'first col' 'second col' 'third col'; 0, 0, 1; 0, 0, 2; 0, 0, 3; 0, 0, 4; 0, 0, 5}

回答 (1 件)

Voss
Voss 2020 年 7 月 4 日
added = [tothis [addheader; addthis]];

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by