Improve parsing of MATLAB output.