from scipy.io import loadmat
import numpy as np
matrixVar = loadmat( "someMatrix.mat" )
# Do whatever data manipulation you need here
# Let's do a simple transpose for the sake of the example.
mainpulatedData = np.transpose(matrixVar)
# Do more stuff here if needed
# ...
print( 'Done processing' )
1条答案
按热度按时间piv4azn71#
您可以使用scipy加载.mat文件,然后使用Data Viewer对其进行可视化。首先需要安装VSCode的Python和Python扩展。
下面是一个非常基本的示例:
要打开Data Viewer,请在加载和处理数据的行后放置一个断点,然后以Python模式运行Python。在右侧,右键单击感兴趣的变量(本例中为
mainpulatedData
)并选择View Value in Data Viewer
。This is how you access the Data Viewer。
Here is an example of what it should look like。
我不知道为什么社区中的一些成员早些时候与你就语义和定义争论一个没有意义的问题,但我猜他们每个人都有自己的观点。
祝你好运!