k-D Tree implementation for MATLAB