Matlab code for extracting time-domain position data for a cart on a linear track