final comparison with matlab