How to eliminate a column from a matrix?

1 visualización (últimos 30 días)
S Priya
S Priya el 3 de Sept. de 2021
Comentada: S Priya el 3 de Sept. de 2021
C =
C=[ 0.2474 -0.0311 0
0 0 0.5000 ]
I want to eliminate the last column. How to do it?

Respuesta aceptada

Chunru
Chunru el 3 de Sept. de 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 comentarios
S Priya
S Priya el 3 de Sept. de 2021
Thank you
S Priya
S Priya el 3 de Sept. de 2021
What if we want to remove the middle column?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by