Atom topic feed | site map | contact | login | Protection des données personnelles | Powered by FluxBB | réalisation artaban
You are not logged in.
Hi everyone.
I extracted the mass and stiffness matrix of a structure using in the comm file these instruction
import numpy as np
import scipy.sparse as ss
# vals, lins, cols, dim = M.EXTR_MATR(sparse=True)
mas = ss.csr_matrix(M.EXTR_MATR())
stif = ss.csr_matrix(K.EXTR_MATR())
ss.save_npz("/home/daniele/salome_meca/appli_V2019.0.3_universal/USERS/prova/Mass.npz", mas)
ss.save_npz("/home/daniele/salome_meca/appli_V2019.0.3_universal/USERS/prova/Stiff.npz", stif)
At the end i obtained the compressed file mas and stif containing npy files. How can i rebuild the matrices in matlab?
Thank you to those can help me
Offline
Hi,
You can use directly the aij format (vals, lins, cols, dim) and use scipy.io.savemat to save them directly in mat format and import the mat file into Matlab.
Regards,
Loic
Offline