Skip to content

Matlab 7.3 support #1

Open
Open

Description

@simmarn

Hi!

MatFileHandler works brilliantly with Matlab 5.0 mat files. But I need support for reading Matlab 7.0. Is that in the pipe?

Right now I get when trying to read:

Unhandled Exception: System.NotSupportedException: Unknown element.
   at MatFileHandler.DataElementReader.Read(BinaryReader reader)
   at MatFileHandler.MatFileReader.Read(BinaryReader reader)
   at MatFileHandler.MatFileReader.Read()
   at MatReaderTest.Program.Main(String[] args) in C:\Users\Martin Olausson\source\repos\MatReader\MatReader\Program.cs:line 28

Activity

  1. mahalex commented on Aug 30, 2018

    @mahalex
    Owner

    Thanks for your feedback!
    I think Matlab 7.0 files are supported, as long as they only contain "ordinary" things like matrices, structure arrays, cell arrays, etc. However, reading Matlab "objects" (instances of user-defined Matlab classes) is not currently supported. The documentation for object storage seems scarce (I believe the official documentation is non-existent). Could you please share some file that you cannot import, and I'll take a closer look at it? This way we will be really sure what we're talking about.

  2. simmarn commented on Aug 30, 2018

    @simmarn
    Author

    Certainly. Here you have the Matlab 7.0 file I can not open. I do not think it contains any "objects".
    https://simmarn.mydns.se/nextcloud/index.php/s/k3rA4Z4P4egiDqG

  3. mahalex commented on Sep 2, 2018

    @mahalex
    Owner

    It looks like this file is actually in Matlab 7.3 format. It was produced by libmatio rather than Matlab (and it incorrectly states that it's Matlab 7.0 in the comment). Supporting 7.3 format would mean dealing with the horrible HDF5 format. A year ago (when I last researched HDF5) it seemed close to impossible. To my knowledge, there are still no native C# libraries for accessing HDF5 data, so I would have to rely on external C libraries, which doesn't sound exciting to me. Maybe the situation has changed since then, so I'll try to look into it again. In any case, I don't think there is a quick fix for that, sorry!

  4. simmarn commented on Sep 2, 2018

    @simmarn
    Author

    OK. Thanks for checking.

  5. self-assigned this
    on Sep 11, 2018
  6. changed the title [-]Matlab 7.0 support[/-] [+]Matlab 7.3 support[/+] on Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions