Matlab implementation of LPP algorithm