update the findnearest algorithm; added a matlab evaluation program