如何在colab中加载matlab文件?

时间:2020-01-07 05:53:04

标签: python matlab google-colaboratory

我想使用

MATLAB 文件加载到 COLAB
scipy.io.loadmat('../Data/burgers_shock.mat')

我不知道如何设置.mat文件的路径以及保存.mat文件的位置。

1 个答案:

答案 0 :(得分:1)

  1. 将.mat文件上传到驱动器上。
  2. 将这些行添加到代码顶部 从google.colab导入驱动器 drive.mount('/ content / drive')
  3. 然后使用以下路径加载 S = scipy.io.loadmat('/ content / drive / My Drive / burgers_shock.mat');