Python Forum

Full Version: Reading of structured .mat (matlab) file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi
I am trying to Read .mat (matlab) structured file using python.[/b]
1: I had opened the file using scipy.io
2:Tried to print the data but,all data is printing in combined structure not in original hierarchical format


How can I able to read the data from mat file in its original structured way.
post your code in python tags, along with sample input/desired output data
code:
import scipy.io as spio
mat = spio.loadmat('F:\\matlab_file.mat', squeeze_me=True)
print(type(mat))
key=(mat.keys())
value1=mat[key[0]]


Here is the code
Output of value1 should be in dictionary format as it is nested structure
But I am getting list or nd.array that is combined data