Load symbolic matrix in python

4 vues (au cours des 30 derniers jours)
mikel lasa
mikel lasa le 4 Fév 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

Réponses (1)

Prasanna Konyala
Prasanna Konyala le 1 Avr 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.

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by