Does anyone know if it’s possible to use MAT.jl to write a .mat file that contains a MATLAB struct array? It would be nice if something like this worked:
julia> using MAT
julia> struct A
x::Int
y::Int
end
julia> matwrite("test.mat", Dict("x" => [A(1, 2), A(3, 4)]))
ERROR: This is the write function for CompositeKind, but the input doesn't fit
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] m_write(mfile::MAT.MAT_HDF5.MatlabHDF5File, parent::HDF5.Group, name::String, s::A)
@ MAT.MAT_HDF5 ~/.julia/packages/MAT/f523T/src/MAT_HDF5.jl:530
[3] m_write(mfile::MAT.MAT_HDF5.MatlabHDF5File, parent::HDF5.File, name::String, data::Vector{A})
@ MAT.MAT_HDF5 ~/.julia/packages/MAT/f523T/src/MAT_HDF5.jl:479
[4] write(parent::MAT.MAT_HDF5.MatlabHDF5File, name::String, thing::Vector{A})
@ MAT.MAT_HDF5 ~/.julia/packages/MAT/f523T/src/MAT_HDF5.jl:546
[5] matwrite(filename::String, dict::Dict{String, Vector{A}}; compress::Bool)
@ MAT ~/.julia/packages/MAT/f523T/src/MAT.jl:157
[6] matwrite(filename::String, dict::Dict{String, Vector{A}})
@ MAT ~/.julia/packages/MAT/f523T/src/MAT.jl:148
[7] top-level scope
@ REPL[14]:1