MATLAB class wrapper for a C++ implementation of a Quadtree
This implementation is based on the paper:
S. F. Frisken and R. N. Perry,
``Simple and Efficient Traversal Methods for Quadtrees and Octrees,''
Journal of Graphics Tools, 2002, Vol. 7, pg. 1-11
This Quadtree class seems to beat MATLAB's KDTree class for speed, both in creating the tree and when doing k-nearest neighbor searches.
Note: it is possible to extend this code to an Octree.
Cite As
Shawn Walker (2026). MATLAB class wrapper for a C++ implementation of a Quadtree (https://nl.mathworks.com/matlabcentral/fileexchange/45020-matlab-class-wrapper-for-a-c-implementation-of-a-quadtree), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- AI and Statistics > Statistics and Machine Learning Toolbox > Cluster Analysis and Anomaly Detection > Nearest Neighbors >
- MATLAB > Mathematics > Computational Geometry > Spatial Search >
Tags
Acknowledgements
Inspired by: Example MATLAB class wrapper for a C++ class
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
QuadTree/
QuadTree/@mexQuadtree/
QuadTree/Unit_Test/
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
