KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a .mat file generated from matlab 2012b. It contains a variable with a user-defined matlab class. When loading the file using scipy.io.loadmat in python 3.3, I get the following: mat=scipy.io.loadmat('D:\test.mat') mat {'__header__': b'MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Fri Feb 22 15:26:28 2013', '__function_workspace__': array([[ 0, 1, 73, ..., 0, 0, 0]], dtype=uint8), '__globals__': [], '__version__': '1.0', 'None': MatlabOpaque([ (b'futureDS', b'MCOS', b'cStream', [[3707764736], [2], [1], [1], [1], [1]])], dtype=[('s0', 'O'), ('s1', 'O'), ('s2', 'O'), ('arr', 'O')])} I am looking to access the "futureDS" object of type "cStream" but seem unable to do so using mat['None']. Calling mat['None'] simple results in: MatlabOpaque([ (b'futureDS', b'MCOS', b'cStream', [[3707764736], [2], [1], [1], [1], [1]])], dtype=[('s0', 'O'), ('s1', 'O'), ('s2', 'O'), ('arr', 'O')]) I am stuck here. I am new to python and trying to port my old work from matlab. Any help would be appreciated. Thank you.
Tags (comma-separated)
Save Edits
Cancel