Starting from: zhuanlan.zhihu.com/p/228376701

The mountain will not come to me, I will go to the mountain

— Islam, chapter 3, verse 4

0. Tease

 

Recently, when I was processing data, I came across a. Mat file and recorded my understanding and processing steps.

Mat file is a common data format in Matlab, which is similar to JSON key-value pairs.

{'__header__': B 'MATLAB 5.0 Mat-File Platform: NT, Created on: Wed Sep 9 16:13:43 2020'.'__version__': '1.0'.'__globals__': [].'key1': array([[0.1]]), 'key2': array([[3]])}
Copy the code

 

1. The actual combat

 

In Python, you need to manipulate.mat files through scipy. If not installed, perform the following steps: