How to eliminate a column from a matrix?

1 回表示 (過去 30 日間)
S Priya
S Priya 2021 年 9 月 3 日
コメント済み: S Priya 2021 年 9 月 3 日
C =
C=[ 0.2474 -0.0311 0
0 0 0.5000 ]
I want to eliminate the last column. How to do it?

採用された回答

Chunru
Chunru 2021 年 9 月 3 日
C=[ 0.2474 -0.0311 0
0 0 0.5000 ];
C(:, end) = []; % remove last column
C
C = 2×2
0.2474 -0.0311 0 0
  2 件のコメント
S Priya
S Priya 2021 年 9 月 3 日
Thank you
S Priya
S Priya 2021 年 9 月 3 日
What if we want to remove the middle column?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by