how to give column header name

2 ビュー (過去 30 日間)
raqib Iqbal
raqib Iqbal 2020 年 7 月 3 日
コメント済み: madhan ravi 2020 年 7 月 3 日
block=[1 10;2 11;3 12;4 13;5 14]
how to make individual column name? like c1=channel and c2=quality and display the column with header name

採用された回答

madhan ravi
madhan ravi 2020 年 7 月 3 日
BLOCK = table;
BLOCK.channeL = block(:, 1);
BLOCK.quality = block(:, 2)
  5 件のコメント
Image Analyst
Image Analyst 2020 年 7 月 3 日
編集済み: Image Analyst 2020 年 7 月 3 日
No you didn't (capitalization was wrong) but in your defense it might have been a bad idea to name the table BLOCK when the other variable was named block. Try this:
block=[1 10;2 11;3 12;4 13;5 14]
t = table;
t.channel = block(:, 1);
t.quality = block(:, 2)
t =
5×2 table
channel quality
_______ _______
1 10
2 11
3 12
4 13
5 14
Or try this:
block=[1 10;2 11;3 12;4 13;5 14]
t = table(block(:, 1), block(:, 2), 'VariableNames', {'channel', 'quality'})
madhan ravi
madhan ravi 2020 年 7 月 3 日
Thank you sir Image Analyst :)

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by