필터 지우기
필터 지우기

how can i remove an element from a matrix

조회 수: 1 (최근 30일)
Imane hammou ouali
Imane hammou ouali 2019년 4월 14일
댓글: Walter Roberson 2019년 4월 14일
hello community,
i have a matrix A=[0 0 0;0.7 1 0.7] i want to remove the element 1 A(2,2) help please

답변 (1개)

Ronny Landsverk
Ronny Landsverk 2019년 4월 14일
If you want a representation of an empty element, use NaN (not a number).
A(2,2) = NaN;
  댓글 수: 1
Walter Roberson
Walter Roberson 2019년 4월 14일
And if replacing the location with some set value such as NaN or -9999 is not appropriate, then you have the problem that rectangular arrays cannot have "holes" in them.

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

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by