What is algorithm used in rangesearch function in matlab
3 views (last 30 days)
Show older comments
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
0 Comments
Accepted Answer
Walter Roberson
on 21 May 2018
15 Comments
Walter Roberson
on 20 Aug 2018
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”
More Answers (1)
the cyclist
on 21 May 2018
There are typically two places to look for algorithm references for MATLAB function:
- The documentation page for that function
- 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)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!