Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.28 KB | None | 0 0
  1. comp1=data(:,:,1);
  2. p=1;
  3. for i=1:256 for j=1:320
  4. if(isnan(comp1(i,j))==0)
  5.     xcomp1(p)=j;
  6.     ycomp1(p)=i;
  7.     p=p+1;
  8. end; end; end;
  9.  
  10. plot(xcomp1,ycomp1,'.');
  11. test=kmeans([xcomp1' ycomp1'],6);
  12. for i=1:6
  13.     nindex=find(test==i);
  14.     figure;
  15.     plot(xcomp1(nindex),ycomp1(nindex),'.');
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement