Author: Not specified Language: text
Description: Not specified Timestamp: 2017-04-30 13:56:56 +0000
View raw paste Reply
  1. classOne = [];
  2. classTwo = [];
  3. classThree = [];
  4. classFour = [];
  5. classFive = [];
  6. classSix = [];
  7. classSeven = [];
  8. classEight = [];
  9. classNine = [];
  10. classTen = [];
  11.  
  12.         %length of train_labels
  13. for i=1:60000
  14.     if(train_labels(i,1)==1)
  15.         classOne = [classOne;pca_value(i,:)];
  16.     end
  17.  
  18.     if(train_labels(i,1)==2)
  19.         classTwo = [classTwo;pca_value(i,:)];
  20.     end
  21.  
  22.     if(train_labels(i,1)==3)
  23.         classThree = [classThree;pca_value(i,:)];
  24.     end
  25.  
  26.     if(train_labels(i,1)==4)
  27.         classFour = [classFour;pca_value(i,:)];
  28.     end
  29.  
  30.     if(train_labels(i,1)==5)
  31.         classFive = [classFive;pca_value(i,:)];
  32.     end
  33.  
  34.     if(train_labels(i,1)==6)
  35.         classSix = [classSix;pca_value(i,:)];
  36.     end
  37.  
  38.     if(train_labels(i,1)==7)
  39.         classSeven = [classSeven;pca_value(i,:)];
  40.     end
  41.  
  42.     if(train_labels(i,1)==8)
  43.         classEight = [classEight;pca_value(i,:)];
  44.     end
  45.  
  46.     if(train_labels(i,1)==9)
  47.         classNine = [classNine;pca_value(i,:)];
  48.     end
  49.  
  50.     if(train_labels(i,1)==10)
  51.         classTen = [classTen;pca_value(i,:)];
  52.     end
  53. end
  54.  
  55. figure
  56. hold on
  57. plot(classOne(:,1),classOne(:,2),'.g');
  58. plot(classTwo(:,1),classTwo(:,2),'.b');
  59. plot(classThree(:,1),classThree(:,2),'.y');
  60. plot(classFour(:,1),classFour(:,2),'.m');
  61. plot(classFive(:,1),classFive(:,2),'.c');
  62. plot(classSix(:,1),classSix(:,2),'.r');
  63. plot(classSeven(:,1),classSeven(:,2),'Color',[1,0.427,0.384],'Marker','.','LineStyle','None');
  64. plot(classEight(:,1),classEight(:,2),'Color',[1,0.7,0.3],'Marker','.','LineStyle','None');
  65. plot(classNine(:,1),classNine(:,2),'Color',[0.2,0.7,0.3],'Marker','.','LineStyle','None');
  66. plot(classTen(:,1),classTen(:,2),'Color',[0,0.7,0.9],'Marker','.','LineStyle','None');
  67. hold off
View raw paste Reply