Unable to load Matlab .mat files in Octave

I want to run a Matlab Code on Octave (MatLab version R2021a). I want to load a .mat file, and I tried different methods to load it in Octave, but I obtain a [6x1] uint32 Matrix, and the Project, where the data I need are saved, says [0x0 unknown]. Is this a compatibility problem? How can I solve this? Thank you very much to anyone can help!

My system

  • OS: Windows 10
  • Octave version: Version 6.3.0
  • Installation method: Downloaded and installed “octave-6.3.0-w64-installer.exe” from Download

Do you know the actual type of the variable you’d like to load?
Saving or loading classdef objects isn’t supported in Octave yet.

As a workaround: Would it be possible to cast the object to and from struct? Saving and loading struct variables should be working correctly in Octave.

My variable was of type of project, I saved it as a struct and now I can load it on Octave, Thanks!

However, in the variable “project”, I also had several variables “zone”, and it looks like Octave can not read them, should every “Zone” also be saved as a struct? Or is there a way to have several zones inside one variable, so that it is easier to import the data?

If there are other objects nested inside the top-level object, you would probably need to convert those to struct recursively.
I don’t know if there are built-in functions or tricks to do that automatically. But since you probably know how the object is set up, you’ll probably be able to write a small function that can do the conversion for you.

Yes, I see! Thank you so much for the quick support!