%Doug Van Nort  MUMT 611  Final Project: Timbre Recognition via HMM's
%
%Matlab script to map observed feature vector to nearest neighbor codebook entry 

function Y = code_obs_map(X,codebook,k)

for j=1:100
    for i=1:k
    disty(i) = dist2(codebook(i,:),X(j,:));
    end
    Y(j) = argmin(disty);
end
