read matlab data - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: read matlab data (/thread-40875.html) |
read matlab data - pz16 - Oct-06-2023 Hello, I have some data stored in a matab file (data.mat). The data is stored in a table as shown in the following figure (screen shot from matlab). [attachment=2593] I use the following python code to read in the mat-file: import scipy.io as spio lib = spio.loadmat('data.mat') lib
data_1=lib['__function_workspace__'][0] data_1
len(data_1) When I read in the mat-file, I get a single vector, which makes no sense to me. Does anyone have an example of how to read in matlab files? I have attached table in the zip-file.The mat-file is stored with Matlab version 9.7.0.1190202 (R2019b) RE: read matlab data - snippsat - Oct-06-2023 Some advice,i not to familiar with read Matlab file into Python. Quote:To extract meaningful data from the MatlabOpaque object (table), you'd typically have a few options: |