# \[ANN\] MAT.jl v0.11 -- classes and struct arrays

**URL:** <https://discourse.julialang.org/t/ann-mat-jl-v0-11-classes-and-struct-arrays/134007>\
**Category:** Package Announcements\
**Created:** [November 20, 2025, 12:46pm UTC](https://discourse.julialang.org/t/ann-mat-jl-v0-11-classes-and-struct-arrays/134007 "2025-11-20T12:46:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MatthijsCox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/matthijscox/32/42831_2.png) [@MatthijsCox](https://discourse.julialang.org/u/MatthijsCox)\
**Post date:** [November 20, 2025, 12:46pm UTC](https://discourse.julialang.org/t/ann-mat-jl-v0-11-classes-and-struct-arrays/134007/1 "2025-11-20T12:46:28Z")

</div>

# MAT.jl v0.11 release

After almost 1.5 years since the release of v0.10.7, we have managed to make some big improvements to MAT.jl in v0.11.0.  
🎂  
Please try it out and report back to us if you find any issues 🙂

## Breaking changes

Unfortunately some breaking changes to support better writing:

- Read `MatlabStructArray` instead of a `Dict{String,Any}` with `Array{Any,N}` values
- Read `MatlabClassObject` instead of a `Dict{String,Any}` with `"class"` key

## New features

But you gain these wonderful features:

- Write `MatlabStructArray`; my personal reason to contribute, see the [object array docs](https://juliaio.github.io/MAT.jl/stable/object_arrays/) for more info
- Write `MatlabClassObject`; these are old types of MATLAB classes stored in directories like `@MyClass`
- Read `MatlabOpaque`; the modern MATLAB classes, with automatic type conversion for:
  - `string` to `String`
  - `duration` to `Dates.Millisecond`
  - `datetime` to `Dates.DateTime`
  - `categorical` to `PooledArrays.PooledArray`
  - `table` to `MatlabTable` or tables like `DataFrame`

## Fixes:

These fixes were mostly dangling unreleased in the master branch:

- MAT v4: handle null-terminator `'\0'` in names
- Writing `AbstractArray` types
- Writing `Char` type

## Example: DataFrame reading

Finally we can read DataFrames! Unless the table columns are ND-arrays instead of vectors, but what kind of monster would do that?

```julia
using MAT, DataFrames
filepath = abspath(pkgdir(MAT), "./test/v7.3/struct_table_datetime.mat")
vars = matread(filepath; table = DataFrame)
vars["s"]["testTable"]

# outputs

3×5 DataFrame
 Row │ FlightNum Customer Date Rating Comment
     │ Float64 String DateTime String String
─────┼─────────────────────────────────────────────────────────────────────────────────────
   1 │ 1261.0 Jones 2016-12-20T00:00:00 Good Flight left on time, not crowded
   2 │ 547.0 Brown 2016-12-21T00:00:00 Poor Late departure, ran out of dinne…
   3 │ 3489.0 Smith 2016-12-22T00:00:00 Fair Late, but only by half an hour. …

```

Many credits to the creator of the Python [matio](https://github.com/foreverallama/matio) package for helping to load the undocumented Matlab Class Object Subsystem (MCOS) in Julia. Now you can finally load modern .mat files that would throw errors or warnings before in v0.10.  
We intend to add writing of these `MatlabOpaque` classes in a next release.

If you have (weird) .mat files, go try out MAT.jl v0.11. Please open Github issues if you find problems, because I’m sure we missed many corner cases.
