      clc;
      clear;
      close all;

     load Selected_data ;
       
      mcop=0;
      cop=zeros(1,10); %%%%cop is the loop numbers loop of cluster algorithm
     
  for cloop=1:10
      v=selmatrix1;
      kstart=3;    %%%%%Rank k
      kend=3;
      nloop=10;
     verbose=10;

     [consensus,w,h]=nmfconsensus(v,kstart,kend,nloop,verbose);

    [ordcons,clustid,ordindex,coph] = nmforderconsensus(consensus,kstart,kend,h);
    
    cop(cloop)=coph(kstart);
     if (cop(cloop)>mcop)
        mcop=cop(cloop);
        save  results; 
     end
   end
