script to process data with matlab