3
$\begingroup$

I have a ".fig" file from MATLAB that I know is a list of $ (x, y) $ coordinates. As far as I know, the ".fig" format stores the data and recreates it every time is opened. I would like to get the data in Mathematica.

Import says "Cannot infer format of file". Read says "Invalid input found when reading MATLAB 5.0 MAT-file".

$\endgroup$
  • 2
    $\begingroup$ BinaryReadList[file] will allow you to import the binary of the file, but .fig files are not in plain text. I think you would have to know what encoding Mathworks used to create their file format. $\endgroup$ – MassDefect Dec 13 '18 at 22:48
  • $\begingroup$ do you have access to Matlab itself (or Octave?) $\endgroup$ – Nasser Dec 13 '18 at 23:28
  • 1
    $\begingroup$ @Nasser Not now, but I could install Octave if needed. $\endgroup$ – daviberto Dec 14 '18 at 0:01
  • 2
    $\begingroup$ mathworks.com/matlabcentral/answers/… $\endgroup$ – Alan Dec 14 '18 at 0:55
  • 1
    $\begingroup$ Possibly helpful: undocumentedmatlab.com/blog/fig-files-format "FIGs are simply MATs in disguise" Mathematica has some support for old versions of the MAT format. The newest version is HDF5-based, and Mathematica can read H5 too. So there is hope. But it will take time to figure everything out. $\endgroup$ – Szabolcs Dec 14 '18 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.