How to eliminate a column from a matrix?

조회 수: 1 (최근 30일)
S Priya
S Priya 2021년 9월 3일
댓글: S Priya 2021년 9월 3일
C =
C=[ 0.2474 -0.0311 0
0 0 0.5000 ]
I want to eliminate the last column. How to do it?

채택된 답변

Chunru
Chunru 2021년 9월 3일
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
S Priya
S Priya 2021년 9월 3일
Thank you
S Priya
S Priya 2021년 9월 3일
What if we want to remove the middle column?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by