Matlab software for controlling experiments