Create nearestN.m