Karim
Karim

Reputation: 41

How to load matlab file in colab?

I want to load a MATLAB file into COLAB using

scipy.io.loadmat('../Data/burgers_shock.mat')

I don't know how to set the path for .mat file and where to keep the .mat file.

Upvotes: 2

Views: 10972

Answers (1)

sarangi
sarangi

Reputation: 31

  1. upload your .mat file on your drive.
  2. add these lines at the top of your code from google.colab import drive drive.mount('/content/drive')
  3. then just load using the following path S=scipy.io.loadmat('/content/drive/My Drive/burgers_shock.mat');

Upvotes: 3

Related Questions