How to eliminate a column from a matrix?

1 Ansicht (letzte 30 Tage)
S Priya
S Priya am 3 Sep. 2021
Kommentiert: S Priya am 3 Sep. 2021
C =
C=[ 0.2474 -0.0311 0
0 0 0.5000 ]
I want to eliminate the last column. How to do it?

Akzeptierte Antwort

Chunru
Chunru am 3 Sep. 2021
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 Kommentare
S Priya
S Priya am 3 Sep. 2021
Thank you
S Priya
S Priya am 3 Sep. 2021
What if we want to remove the middle column?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by