0

A .mat file contains a python dictionary containing the following keys:

- "dt" : the time step of the simulation

- x" : the matrix containing the x coordinates of each point of the mesh

- y" : the matrix containing the y coordinates of each point of the mesh

- u": the 3-dimensional array containing the longitudinal velocity for each instant at each point of the mesh

- v": the 3-dimensional array containing the vertical velocity for each instant at each point of the mesh

When I try to open the file :

from scipy.io import loadmat
data = loadmat('/Users/simograbzi/PythonProjects/wake_Re500.mat')
print(data)

I get this error :

  File ~/PythonProjects/untitled0.py:10 in <module>
    data = loadmat('/Users/simograbzi/PythonProjects/wake_Re500.mat')

  File ~/opt/anaconda3/lib/python3.9/site-packages/scipy/io/matlab/mio.py:226 in loadmat
    matfile_dict = MR.get_variables(variable_names)

  File ~/opt/anaconda3/lib/python3.9/site-packages/scipy/io/matlab/mio5.py:312 in get_variables
    hdr, next_position = self.read_var_header()

  File ~/opt/anaconda3/lib/python3.9/site-packages/scipy/io/matlab/mio5.py:271 in read_var_header
    raise TypeError('Expecting miMATRIX type here, got %d' % mdtype)

TypeError: Expecting miMATRIX type here, got 825375027
simogbz
  • 1
  • 1

0 Answers0