MAT.jl
MAT.jl copied to clipboard
duration support
Hi, I have files from a motion databases which associates a motion matrice to a TimeStamp.
The timestamp parts is not loaded by MAT.jl
The matlab type is "duration"
Cf. CompoundPeriod for a possible type to translate duration into: https://docs.julialang.org/en/v1/stdlib/Dates/#Dates-and-Time-Types
Right now, MAT.jl returns an empty value. I have to dig into the package to see where to put the conversion
@stemann so I tried to load the data as UInt32 an that gives me :
julia> vars["dur_1"]
6×1 Matrix{UInt32}:
0xdd000000
0x00000002
0x00000001
0x00000001
0x00000001
0x00000001
julia> Int.(ans)
6×1 Matrix{Int64}:
3707764736
2
1
1
1
1
No idea what to do with that to get that :
Weirdly If I extract only one element of the TimeStamp I still get the same results...
You may want to look into how duration is represented in the MAT-file - it looks like it could be a bit complicated: https://www.mathworks.com/help/coder/ug/define-duration-array-inputs.html
I did it but no information about it.
I guess I have to reverse engineer it if I really want that possibility...
Le jeu. 20 févr. 2025, 00:43, Jesper Stemann Andersen < @.***> a écrit :
You may want to look into how duration is represented in the MAT-file - it looks like it could be a bit complicated: https://www.mathworks.com/help/coder/ug/define-duration-array-inputs.html
— Reply to this email directly, view it on GitHub https://github.com/JuliaIO/MAT.jl/issues/201#issuecomment-2670024702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC5P7O7EYED47P7LRN3LTG32QUJKPAVCNFSM6AAAAABXB2V7IOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZQGAZDINZQGI . You are receiving this because you authored the thread.Message ID: @.***> [image: stemann]stemann left a comment (JuliaIO/MAT.jl#201) https://github.com/JuliaIO/MAT.jl/issues/201#issuecomment-2670024702
You may want to look into how duration is represented in the MAT-file - it looks like it could be a bit complicated: https://www.mathworks.com/help/coder/ug/define-duration-array-inputs.html
— Reply to this email directly, view it on GitHub https://github.com/JuliaIO/MAT.jl/issues/201#issuecomment-2670024702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC5P7O7EYED47P7LRN3LTG32QUJKPAVCNFSM6AAAAABXB2V7IOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZQGAZDINZQGI . You are receiving this because you authored the thread.Message ID: @.***>
We're working on class support, hopefully that will allow duration support soon as well: #205
Reading of duration is supported now with the Dates.Millisecond type in v0.11