1

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.

Shai
  • 111,146
  • 38
  • 238
  • 371
Ali
  • 18,665
  • 21
  • 103
  • 138

2 Answers2

1

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

Maurits Rijk
  • 9,789
  • 2
  • 36
  • 53
  • OK, now you would know how much clojure / java I know! I downloaded the jmatio.jar but how can I import it so that I can use it in clojure. If I am not mistaken there is no `import * from XXX` in clojure as there is in Python. – Ali Nov 12 '11 at 23:28
  • @Ali -- that should be asked as a separate question (and it may even already have been asked). – Matt Fenwick Nov 13 '11 at 12:17
0

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.

Ali
  • 18,665
  • 21
  • 103
  • 138