What is algorithm used in rangesearch function in matlab

조회 수: 2 (최근 30일)
amj
amj 2018년 5월 21일
댓글: amj 2018년 8월 21일
Hi
I worked with rangesearch function in Matlab for my project. https://uk.mathworks.com/help/stats/rangesearch.html
It does work well.
I would like to get your advice if it is relevant.
What is the algorithm behind the rangesearch function in matlab?
I found several papers about the fixed-radius nearest neighbor but i'm worry if the algorithm i write in my paper is not the actual algorithm applied in rangesearch function in Matlab
Thanks in advance

채택된 답변

Walter Roberson
Walter Roberson 2018년 5월 21일
  댓글 수: 15
Walter Roberson
Walter Roberson 2018년 8월 20일
Mathworks replied to me:
==== begin quote ====
I have reviewed the functions in the “KDTreeSearcher” class, and I can confirm that its default behavior corresponds to the k-d tree algorithm created by Friedman, Bentely, and Finkel and published in the paper you mentioned.
It is important to note that most functions that invoke the “KDTreeSearcher” class first build the k-d tree, then search it. The computational cost of building the tree is not considered by Friedman et al. in their published efficiently gains. For that reason, situations can be constructed where an exhaustive search algorithm can be more efficient than building and searching a k-d tree. If you are interested in determining the amount of time spent searching the tree, not building it, the following example code can be used:
>> x_data = rand(1e5,2);
>> y_data = rand(10,2);
>> r = 0.3;
>> profile on
>> rangesearch(x_data,y_data,r);
>> profile viewer
The time taken by the search algorithm is displayed next to “KDTreeSearcher.rangesearch”
amj
amj 2018년 8월 21일
Dear Walter Roberson, Thanks a millions for your help. This confirmation is very helpful and significant. Thank you very much

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

추가 답변 (1개)

the cyclist
the cyclist 2018년 5월 21일
There are typically two places to look for algorithm references for MATLAB function:
  1. The documentation page for that function
  2. Inside the function itself: Use "type function_name" to get a listing of the function, and look there (especially near the top of the file, but sometimes inline where subfunctions are called)

카테고리

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