update with matlab functions