 <span class="n">X</span><span class="p">(:,</span><span class="n">assignments</span><span class="o">==</span><span class="nb">i</span><span class="p">);</span>

    <span class="n">initWeights</span><span class="p">(</span><span class="nb">i</span><span class="p">)</span> <span class="p">=</span> <span class="nb">size</span><span class="p">(</span><span class="n">Xk</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="n">numClusters</span><sp