%Doug Van Nort
%
%This Matlab script computes the k means clustering part of an HMM timbre
%recgonition system. This is used for vector quantization of a discrete
%observation probability densities.
%
%in this script we compute clustering for modeling of flute timbre


clusterFall = [ftFL(1:100,:);ftFL(201:300,:)];              %Store all training feature vectors for clustering - we need 
for i=6:12                                                  %to be careful not to include our training data
 clusterFall = [clusterFall; ftFL((i-1)*100+1:i*100,:)];
end
for i=14:16
 clusterFall = [clusterFall; ftFL((i-1)*100+1:i*100,:)];
end 
for i=18:19
 clusterFall = [clusterFall; ftFL((i-1)*100+1:i*100,:)];
end
clusterFall = [clusterFall; ftFL(2000+1:2100,:)];
for i=23:26
 clusterFall = [clusterFall; ftFL((i-1)*100+1:i*100,:)];
end 
for i=28:31
 clusterFall = [clusterFall; ftFL((i-1)*100+1:i*100,:)];
end 
for i=33:36
 clusterFall = [clusterFall; ftFL((i-1)*100+1:i*100,:)];
end 

clusterFall = [clusterFall; ftFR(1:100,:);ftFR(201:300,:)];
for i=6:12
 clusterFall = [clusterFall; ftFR((i-1)*100+1:i*100,:)];
end
for i=14:16
 clusterFall = [clusterFall; ftFR((i-1)*100+1:i*100,:)];
end 
for i=18:19
 clusterFall = [clusterFall; ftFR((i-1)*100+1:i*100,:)];
end
clusterFall = [clusterFall; ftFR(2000+1:2100,:)];
for i=23:26
 clusterFall = [clusterFall; ftFR((i-1)*100+1:i*100,:)];
end 
for i=28:31
 clusterFall = [clusterFall; ftFR((i-1)*100+1:i*100,:)];
end 
for i=33:36
 clusterFall = [clusterFall; ftFR((i-1)*100+1:i*100,:)];
end 

  