フィルターのクリア

Adding labels to a matrix number

4 ビュー (過去 30 日間)
Tino
Tino 2019 年 5 月 3 日
コメント済み: Sazid Hasan 2021 年 8 月 27 日
please I have the following matrixes T =
5.1000 3.5000 1.4000 0.2000
6.4000 3.2000 4.5000 1.5000
5.4000 3.4000 1.7000 0.2000
5.7000 2.8000 4.5000 1.3000
5.7000 4.4000 1.5000 0.4000
5.6000 2.9000 3.6000 1.3000
I want to put labels in tabular form to get T =
A B C D Class
5.1000 3.5000 1.4000 0.2000 b1
6.4000 3.2000 4.5000 1.5000 b2
5.4000 3.4000 1.7000 0.2000 b1
5.7000 2.8000 4.5000 1.3000 b2
5.7000 4.4000 1.5000 0.4000 b1
5.6000 2.9000 3.6000 1.3000 b2
Please guide me on this
thanks in advance
Tino

採用された回答

madhan ravi
madhan ravi 2019 年 5 月 3 日
T=array2table(T);
T.CLASS=repmat(['b1';'b2'],3,1);
T.Properties.VariableNames={'A','B','C','D','CLASS'}
  6 件のコメント
Tino
Tino 2019 年 5 月 3 日
Thanks
Sazid Hasan
Sazid Hasan 2021 年 8 月 27 日
If I want to split the class fast 3 as b1 and last 3 as b2, how i can do it?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix and Vector Construction についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by