How to eliminate a column from a matrix?

2 views (last 30 days)
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)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!