semi working with matlab