MCPcopy Index your code
hub / github.com/diffplug/matfilerw

github.com/diffplug/matfilerw @v3.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.0.1 ↗ · + Follow
488 symbols 1,536 edges 55 files 189 documented · 39%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MatFileRW: Read and write MATLAB MAT-files from Java

Maven artifact Latest version Javadoc License Apache

Changelog Travis CI

MatFileRW is a library which allows reading and writing MAT files. Have a look at MatIOTest.java to see each part in use.

As far as compatibility, the TL;DR is that it will work with any MAT-File with default settings. The dirty details are that this library works with v6 and v7, but not v4 or v7.3.

  • v4 is the default format before R8
  • v6 is the default format from R8 to R13
  • v7 is the default format from R14 to present (every R20XXX release)
  • MATLAB does not export to v7.3 by default.
  • The Mathworks website has more details.

codemercenary/jmatio and ca.mjdsystems.jmatio

Since JMatIO wasn't updated for a while, lots of people made forks. One of the most prominent was Jason Lokerson's, hosted on GitHub as codemercenary/JMatIO. It included several improvements, but all the packages were renamed to ca.mjdsystems.jmatio. Starting with 2.0.0, all of the improvements from MatFileRW and ca.mjdsystems.jmatio have been merged into the com.jmatio packages.

If you are a user of the ca.mjdsystems packages, you should download com.diffplug.matsim:matfilerw:2.0.0.TRANSITION from mavenCentral. This contains the ca.mjdsystems.jmatio packages unchanged, but marked as deprecated. After you have removed all dependencies on the ca.mjdsystems.jmatio packages, you will be able to use the regular 2.0.0 version, and its descendants.

Acknowledgements

This project is forked from the JMatIO project originally maintained on SourceForge, and now maintained on GitHub. The name was changed to ensure that we don't infringe the original project's license, but we did not change the package names, so this project is binary compatible with the original JMatIO. We are very thankful to Wojciech Gradkowski for creating JMatIO, but this fork is in no way associated with or endorsed by any authors of the original project.

We have fixed some bugs and added some features (see the changelog), and we will maintain this library into the future. We're happy to accept pull requests too!

People whose commits are included in this project * Original JMatIO project credit to Wojciech Gradkowski * Thanks to Tim Ryan for finding and fixing a multidimensional indexing bug. * MLSparse improvements credit to Sina Samangooei * Reading from streams credit to Jonathan Hare * MCOS and Simulink MAT-File parsing by Matthew Dawson * Further MCOS fixes thanks to Piotr Smolinski * int32 writing by Gabriel Shubiner * ZLIP EOF Exception fix by David Williams * Integration work by Jason Lokerson * Multidimensional array indexing by Mikael Grev * AbstractIterator taken from Google's Guava

Tools used by this project * Formatted by spotless, as such. * Bugs found by findbugs, as such. * OSGi metadata generated by Goomph, which leverages Peter Kriens' bnd. * Built by gradle. * Tested by junit. * Maintained by DiffPlug.

Extension points exported contracts — how you extend this code

ByteStorageSupport (Interface)
(no doc) [9 implementers]
src/main/java/com/jmatio/types/ByteStorageSupport.java
DataOutputStream (Interface)
(no doc) [1 implementers]
src/main/java/com/jmatio/io/stream/DataOutputStream.java

Core symbols most depended-on inside this repo

get
called by 185
src/main/java/com/jmatio/types/MLCell.java
getMLArray
called by 65
src/main/java/com/jmatio/io/MatFileReader.java
writeTo
called by 46
src/main/java/com/jmatio/io/OSArrayTag.java
getField
called by 45
src/main/java/com/jmatio/types/MLStructureObjectBase.java
size
called by 42
src/main/java/com/jmatio/io/stream/DataOutputStream.java
isComplex
called by 38
src/main/java/com/jmatio/types/MLArray.java
add
called by 38
src/main/java/com/jmatio/common/ForwardingCollection.java
getN
called by 34
src/main/java/com/jmatio/types/MLArray.java

Shape

Method 427
Class 56
Interface 3
Enum 2

Languages

Java100%

Modules by API surface

src/test/java/com/jmatio/io/MatIOTest.java42 symbols
src/main/java/com/jmatio/types/MLArray.java38 symbols
src/main/java/com/jmatio/io/MatFileReader.java28 symbols
src/main/java/com/jmatio/types/MLSparse.java27 symbols
src/main/java/com/jmatio/types/MLNumericArray.java23 symbols
src/main/java/com/jmatio/common/DeterministicKeyMap.java21 symbols
src/main/java/com/jmatio/common/ForwardingMap.java16 symbols
src/main/java/com/jmatio/common/ForwardingCollection.java16 symbols
src/main/java/com/jmatio/types/MLUInt8.java12 symbols
src/main/java/com/jmatio/types/MLInt8.java12 symbols
src/main/java/com/jmatio/io/MatFileWriter.java12 symbols
src/main/java/com/jmatio/types/MLUInt64.java11 symbols

For agents

$ claude mcp add matfilerw \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact