Delete duplicates matlab code