Re: Mat file saving opion.
swagata Mukherjee <[email protected]> Wed, 5 Jan 2022 06:33:16 +0530
| Newsgroups | gmane.comp.gnu.octave.general |
|---|---|
| Message-ID | <CAM7LAkQfcyh2AG565TjhEZqM7zTbapyanjq36RZ0c3m7zZbO0A@mail.gmail.com> |
Hi,
Sorry did not attach the file.
getting following error
ValueError Traceback (most recent call
last)<ipython-input-7-3862af9149b9> in <module> 1 import scipy.io
as sio----> 2 traces = sio.loadmat('TRACES1.mat')
D:\Anaconda\lib\site-packages\scipy\io\matlab\mio.py in
loadmat(file_name, mdict, appendmat, **kwargs) 224 with
_open_file_context(file_name, appendmat) as f: 225 MR, _ =
mat_reader_factory(f, **kwargs)--> 226 matfile_dict =
MR.get_variables(variable_names) 227 228 if mdict is not
None:
D:\Anaconda\lib\site-packages\scipy\io\matlab\mio4.py in
get_variables(self, variable_names) 389 mdict = {} 390
while not self.end_of_stream():--> 391 hdr,
next_position = self.read_var_header() 392 name =
asstr(hdr.name) 393 if variable_names is not None and
name not in variable_names:
D:\Anaconda\lib\site-packages\scipy\io\matlab\mio4.py in
read_var_header(self) 345 position in stream of next
variable 346 '''--> 347 hdr =
self._matrix_reader.read_header() 348 n = reduce(lambda x,
y: x*y, hdr.dims, 1) # fast product 349 remaining_bytes =
hdr.dtype.itemsize * n
D:\Anaconda\lib\site-packages\scipy\io\matlab\mio4.py in
read_header(self) 115 O, rest = divmod(rest, 100) #
unused, should be 0 116 if O != 0:--> 117 raise
ValueError('O in MOPT integer should be 0, wrong format?') 118
P, rest = divmod(rest, 10) # data type code e.g miDOUBLE (see
above) 119 T = rest # matrix type code e.g., mxFULL_CLASS
(see above)
ValueError: O in MOPT integer should be 0, wrong format?
Regards
On Tue, Jan 4, 2022 at 10:58 PM Francesco Potortì <[email protected]>
wrote:
> >Wish you all a very happy new year.
>
> Same to you and everyone else!
>
> >I have one .mat file which is in V4.
> >
> >I can load this file in Octave using
> >load TRACES1.mat
> >
> >I want to save this file V7 format.
>
> Try "help save" at the Octave prompt
>
> --
> Francesco Potortì (ricercatore) Voice: +39.050.621.3058
> ISTI - Area della ricerca CNR Mobile: +39.348.8283.107
> via G. Moruzzi 1, I-56124 Pisa Skype: wnlabisti
> (gate 20, 1st floor, room C71) Web: http://fly.isti.cnr.it
>
----------
We are transitioning to a web based forum
for community help discussions at
https://octave.discourse.group/c/help
TRACES1.mat
(application/octet-stream, 234.5 KB) - not displayed