How to eliminate a column from a matrix?

2 visualizzazioni (ultimi 30 giorni)
S Priya
S Priya il 3 Set 2021
Commentato: S Priya il 3 Set 2021
C =
C=[ 0.2474 -0.0311 0
0 0 0.5000 ]
I want to eliminate the last column. How to do it?

Risposta accettata

Chunru
Chunru il 3 Set 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 Commenti
S Priya
S Priya il 3 Set 2021
What if we want to remove the middle column?

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by