n class="p">=</span> <span class="n">vl_kdtreebuild</span><span class="p">(</span><span class="n">X</span><span class="p">)</span> <span class="p">;</span>

<span class="c">% query the kdtree with X itself</span>
<span class="p">[</span><span class="nb">i</span><span class="p">,</span> <span class="n">d</span><span class="p">]</span> <span class="p">=</span> <span class="n">vl_kdtreequery</span><span class="p">(</span><span class="n">kdtree</span><span class="p">,</span> <span class="n">X</span><span class=