omment">% upsample the cluster ownership index so we can apply it to x</span>
0134     A=repmat(A',[dsr,1]);
0135     A=A(:);
0136     A(end:size(x,1))=A(end);
0137     IDX{1}=find(A==0);
0138 <span class="keyword">else</span>
0139     IDX{1}=init;
0140 <span class="keyword">end</span>
0141 
0142 <span class="keyword">if</span> isempty(IDX{1}) <span class="comment">% clustering failed, return just one cluster</span>
0143     IDX{1}=1:size(x,1);
0144     TODSS{1}=nan;
0145     SCORE{1}=nan;
0146     COVS{1}=