5

I've downloaded a data set that I am interested in. However, it is in .mat format and I do not have access to Matlab.

I've done some googling and it says I can open it in SciLab.

I tried a few things, but I haven't found any good tutorials on this.

I did

fd = matfile_open("file.mat")

matfile_listvar(fd)

and that prints out the filename without the extension. I tried

var1 = matfile_varreadnext(fd)

and that just gives me "var1 = "

I don't really know how the data is organized. The repository described the data it contains, but not how it is organized.

So, my question is, what am I doing wrong in extracting/viewing this data? I'm not committed to SciLab, if there is a better tool for this I am open to that.

Nate
  • 1,891
  • 1
  • 18
  • 39

3 Answers3

7

One options is to use Octave, which can read .mat files and run most Matlab .m files. Octave is open source with binaries available for Linux, Mac, and Windows. Inside of Octave you can load the file using:

load file

See Octave's manual section 14.1.3 Simple File I/O for more details.

Richard Povinelli
  • 1,359
  • 1
  • 12
  • 28
1

In Scilab:

loadmatfile('file.mat');

(Source)

Stephen Rauch
  • 40,722
  • 30
  • 82
  • 105
ashu
  • 11
  • 2
0

I had this same interest a few years back. I used this question as a guide. It uses Python and SciPy. There are options for NumPy and hd5f as well. Another option is to write your own reader for the .mat format in whatever language you need. Here is the link to the mat file format definition.

Matt
  • 2,179
  • 2
  • 18
  • 36