Load symbolic matrix in python

4 views (last 30 days)
mikel lasa
mikel lasa on 4 Feb 2022
Answered: Prasanna Konyala on 1 Apr 2022
Hello,
I have a mat file with a symbolic matrix saved. I would like load this matrix in python, my attempt has been this but it doesnt work:
import scipy.io as sio
mSimbolica = sio.loadmat('D:/TFM/control derivativo/bucle_control/Msimbolica.mat')
mSimbolica
I need help please.
attached the .mat file

Answers (1)

Prasanna Konyala
Prasanna Konyala on 1 Apr 2022
Hi
From my understanding, you are facing issue when loading mat file in python.
Loading mat files can cause an error if the version is not compatible with SciPy. Please check your mat file version using the following command:
dbtype filename 1
If the output contains Matlab 7.3 then your file is not compatible, and this needs hdf5 python library.
If version is 5.0 or nothing is specified, then your code should work fine.

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!