View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

4.8 | 11 ratings Rate this file 17 Downloads (last 30 days) File Size: 203 KB File ID: #10759 Version: 1.0

JMatIO - Matlab's MAT-file I/O in JAVA



15 Apr 2006 (Updated )

Package contains Matlab's MAT-file I/O API in JAVA. Supports Matlab 5 MAT-flie format reading and wr

| Watch this File

File Information

JMatIO is a JAVA library to read/write/manipulate with Matlab's binary MAT-files.

Currently supported data types are:
+ Double array
+ UInt8, Int8 array
+ UInt64, Int64 array
+ Char array
+ Structure
+ Cell array
+ Sparase array

this project is also available at


This file inspired Cs Mat Io: Mat File I/O Api For .Net 2.0.

MATLAB release MATLAB 7.0.4 (R14SP2)
Other requirements Java SDK 1.5.0
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
19 Oct 2015 Ned Twigg

Great library, but it hasn't been updated in a while. I am maintaining a binary-compatible fork with some bugfixes and new features here:
- added support for 16-bit integers
- robust parsing of Java objects embedded in the MAT-File
- fixed some bugs in equals() and hashCode() implementations
- OSGI metadata
- available on Maven Central as com.diffplug.matsim:matfilerw

18 Apr 2014 Irma

Irma (view profile)

very useful! Thanks

08 May 2013 Jayant

Jayant (view profile)

How can we save a 3 dimensional array of type MLUInt8? I have the image stored in MWNumericArray format. I am able to create the array of 3 dimensions but I am not able to figure out how to copy the data inside it.

Comment only
22 Feb 2013 Enric Junque de Fortuny

05 Nov 2012 Lee Wei Yeong

29 Aug 2011 Essam Soliman

how to use this library?

22 Aug 2011 Stuart Bowman

Thank you! This is a big help in the world of java apps that produce data that engineers need to analyze. Great API.

Comment only
20 Feb 2011 rohit

rohit (view profile)

very useful

18 Feb 2011 Bryant Mairs

Would be useful to support the single data type. Odd omission from this library.

06 Oct 2010 Lei

Lei (view profile)

Execellent. But problem with large mat files. I have these error messages when reading a large mat file ( > 40 M):
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at Source)
at Source)
at Source)
at Source)
at<init>(Unknown Source)
at<init>(Unknown Source)
at com.Tester.common.Tester.main(

Is there a fix?

08 Aug 2007 iskandar mamaik

11 Apr 2007 Olav -

Very useful library

12 Jan 2007 Leon Lee

Very useful!

24 Apr 2006

Following users' suggestions (thank you Imran) some code parts were modified:
+MLDouble array supports Jama style constructors, and JAVA types
+MLChar String exports
+MatFileReader maps content by name
+JUnit tests added
+JavaDoc added

26 Apr 2006

+ bug fix: reading unsigned values
+ new constructor in MLDouble supporting double[][]
+ filtered reading of MAT-file
+ JUnit test updated

26 Apr 2006

+bug fix: poor performance with big arrays
+documentation updated
+jmatio.jar added

24 May 2006

+improved performance of MatFileReader (~100% faster now)
+JUnit tests added to test and show usage of Cells and Strucutures

22 Feb 2007

+ Added support:UInt8 array
+ MAJOR reading performance enhancement - reading is as fast as in Matlab now
+ Removed Log4j references

02 Mar 2007

+ REGRESSION BUG: double arrays created natively in Matlab are not read correctly (reversed byte ordering)

26 Mar 2007

+ bugfix: struct/cell reading fails when containing empty arrays
+ added: int64 and uint64 support

Contact us