“Öffnen Sie die MAT -Datei in Python” Code-Antworten

Python Open MAT -Datei

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

Öffnen Sie die MAT -Datei in 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

Offene Mathon

from mat4py import loadmat

data = loadmat('datafile.mat')
Fusinato

Lesen Sie .MAT -Datei in Python

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

Lesen Sie .MAT -Datei in Python

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

Ähnliche Antworten wie “Öffnen Sie die MAT -Datei in Python”

Fragen ähnlich wie “Öffnen Sie die MAT -Datei in Python”

Weitere verwandte Antworten zu “Öffnen Sie die MAT -Datei in Python” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen