How to eliminate a column from a matrix?

1 vue (au cours des 30 derniers jours)
S Priya
S Priya le 3 Sep 2021
Commenté : S Priya le 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?

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by