Finding neighbours of an element in a matrix

조회 수: 1 (최근 30일)
Bharathwaj
Bharathwaj 2012년 2월 13일
Suppose that i have an element in a matrix and i need to find its neighbors and the distance of the neighbors...
i want to repeat this process for all elements in the matrix..
  댓글 수: 2
Michael
Michael 2012년 2월 13일
can you define what you mean by "distance"? Each element would have four neighbours each with distance 1. Is the matrix sparse?
Bharathwaj
Bharathwaj 2012년 2월 13일
actually..i have a surface containing paraboloids of different widths/sizes..i need to compute the distance between the centres of the paraboloids. A paraboloid might have 3 , 5 or 8 neighbours depending on where the paraboloid is located.

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

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2012년 2월 13일
please try this is function
OR

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by