MATLAB implementation of the eigenfaces algorithm