How to emtpy part of a matrix?

조회 수: 1 (최근 30일)
Terek Li
Terek Li 2016년 10월 17일
댓글: Terek Li 2016년 10월 17일
If I have a matrix like this :
a = [1 2; 3 4; 5 6; 7 8]
is there a quick way to remove '3' and '4' from the matrix so it looks like :
a = [1 2; [] 4; [] 6; 7 8]?
I only want to remove value in the 1st column starting on the 2nd row and ending at the 2nd last row.
THANKS!

채택된 답변

Andrei Bobrov
Andrei Bobrov 2016년 10월 17일
a = [1 2; 3 4; 5 6; 7 8];
a(2:3,1) = nan;
  댓글 수: 1
Terek Li
Terek Li 2016년 10월 17일
perfect, thanks!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by