[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unknown mat file type, version 100, 105 - Octave
From: |
Kai Torben Ohlhus |
Subject: |
Re: Unknown mat file type, version 100, 105 - Octave |
Date: |
Mon, 26 Aug 2019 17:08:14 +0900 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 8/26/19 2:30 PM, June Wang wrote:
> Hello,
> I just generated a .mat model using octave. But when I load it through
> scipy.io.loadmat('myfile.mat') in python, it says:
> ...
> File
> "C:\Users\junew\Miniconda3\envs\tf_1.14.0\lib\site-packages\scipy\io\matlab\miobase.py",
> line 241, in get_matfile_version
> raise ValueError('Unknown mat file type, version %s, %s' % ret)
> ValueError: Unknown mat file type, version 100, 105
>
> Could anyone help on this please? Thank you
>
> Jun
>
scipy.io.loadmat [1] seems to handle only Matlab input. Thus make sure
to save your data using Matlab output "-v7" [2] from Octave:
save -v7 myfile.mat ...
By default "-text" is used by Octave.
HTH,
Kai
[1]
https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.loadmat.html
[2]https://octave.org/doc/v5.1.0/XREFsave.html