“Leer el archivo .mat en Python” Código de respuesta

Python Open Mat

import scipy.io
mat = scipy.io.loadmat('file.mat')
Worrisome Weasel

Abra el archivo MAT en Python

#!python
#!/usr/bin/env python
from scipy.io import loadmat
x = loadmat('test.mat')
lon = x['lon']
lat = x['lat']
# one-liner to read a single variable
lon = loadmat('test.mat')['lon']
White Faced Tree Rat

Leer el archivo .mat en Python

import h5py
with h5py.File('test.mat', 'r') as file:
    print(list(file.keys()))
Trewqy Zebra

Leer el archivo .mat en Python

with h5py.File('test.mat', 'r') as file:
    a = list(file['a'])
Trewqy Zebra

Respuestas similares a “Leer el archivo .mat en Python”

Preguntas similares a “Leer el archivo .mat en Python”

Más respuestas relacionadas con “Leer el archivo .mat en Python” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código