Load complex MATLAB .mat file in clojure / Incanter

582 Views Asked by At

In my quest to get ride of MATLAB and replace it with Incanter / Clojure I need to be able to load or at least convert a few terabytes of matlab .mat files.

As these are rather complex mat files, with structs and cell arrays nested in all different manners, I see no easy was to export them to any sort of text file an read them later.

Is there any libraries in Clojure (or java?!) that can help me?

Any other suggestions are also very welcome.

2

There are 2 best solutions below

0
On BEST ANSWER

So far my best bet is to read the mat files in MATLAB (or Octave or in Python with scipy/numpy) and write them to text, then read them in Incanter.

Any suggestions are very welcome.

2
On

A quick Google search shows JMatIO, a Java lib to read Matlab 5 .mat files. From there it's easy to use Clojure.