Remove similar values from matrix with tolerance value

조회 수: 2 (최근 30일)
Dina Maulina
Dina Maulina 2019년 6월 28일
댓글: Dina Maulina 2019년 6월 30일
Help me please. I have this matrix, and I want to remove element (32,11) and (32,14) because it is close with (32,12). Can I do that?
Thank you.
Capture.JPG
  댓글 수: 4
Guillaume
Guillaume 2019년 6월 30일
a few difference is not something easy to code. Computers are not able to read your mind or guess what a few difference is. Is 1 a few? Is 10 a few? Is 0.1 a few? Is 1 million a few (it might be compared to the number of atoms in the universe)?
An actual numeric tolerance (relative or absolute), on the other hand, is very easy to code.
Dina Maulina
Dina Maulina 2019년 6월 30일
Yes, I use tolerance right now. And looking for possibility of easier answers.
Anyway, thanks for enlighten me.

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

답변 (1개)

KSSV
KSSV 2019년 6월 28일
Read about pdist2. This will give pairwise distance . Now remove the points which you want to rmove by setting a tolerance in distance.

카테고리

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