matlab2tikz/matlab2tikz — pull request #496 by okomarov (2014-12-17 22:16:26+00:00)
Title: Fix fclose m2t fid

If `m2t` fails, it will lock the directory where it was writing to. Close the opened fid.

Compatibility with Octave should be insured. Compare https://www.gnu.org/software/octave/doc/interpreter/Catching-Errors.html#XREFlasterror vs http://uk.mathworks.com/help/matlab/ref/lasterror.html