rangesearch
Find all neighbors within a specified distance.
📝Syntax
idx = rangesearch(X, Y, r)
idx = rangesearch(X, Y, r, Name, Value)
[idx, D] = rangesearch(...)
📄Description

rangesearch finds all rows of X whose distance to each query row of Y is not greater than r.

The search is exhaustive and native. Outputs are column cell arrays. Supported options include Distance, NSMethod, SortIndices, P, Scale, Cov, BucketSize, and CacheSize.

💡Examples
X = [0 0; 1 0; 0 2; 4 4];
Y = [0 1; 3 4];
[idx, D] = rangesearch(X, Y, 1.1)
🔗See Also
knnsearchpdist
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub