function [] = show_clusters (p,rows,cols)
c = cell(2,5);
k=1;
for j=1:cols
  for i=1:rows
    if(k > size(p,1))
      c{i,j} = zeros(28,28);
    else
      c{i,j} = reshape(p(k,:),28,28);
      k += 1;
    end
  end
end
imshow(1-cell2mat(c));
endfunction
