MulaiMulai sekarang secara gratis

Loading .mat files

In this exercise, you'll figure out how to load a MATLAB file using scipy.io.loadmat() and you'll discover what Python datatype it yields.

The file 'albeck_gene_expression.mat' is in your working directory. This file contains gene expression data from the Albeck Lab at UC Davis.

Latihan ini adalah bagian dari kursus

Introduction to Importing Data in Python

Lihat Kursus

Petunjuk latihan

  • Import the package scipy.io.
  • Load the file 'albeck_gene_expression.mat' into the variable mat; do so using the function scipy.io.loadmat().
  • Use the function type() to print the datatype of mat to the shell.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Import package


# Load MATLAB file: mat


# Print the datatype type of mat
print(____)
Edit dan Jalankan Kode