How to eliminate a column from a matrix?

1 view (last 30 days)
S Priya
S Priya on 3 Sep 2021
Commented: S Priya on 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?

Accepted Answer

Chunru
Chunru on 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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by