asammdf
asammdf copied to clipboard
Export to matlab format, date issue
Python version
Please run the following snippet and write the output here
import platform
import sys
from pprint import pprint
pprint("python=" + sys.version)
pprint("os=" + platform.platform())
try:
import numpy
pprint("numpy=" + numpy.__version__)
except ImportError:
pass
try:
import asammdf
pprint("asammdf=" + asammdf.__version__)
except ImportError:
pass
Code
MDF version
v6.2.0
Code snippet
please write here the code snippet that triggers the error
Traceback
please write here the error traceback
Description
Hi,
I'm using assamdf v6.2.0 to export MF4 files to matlab files. , I’m selecting time as date in the output format, but the .mat file is observed as a double variable. I’m not familiar with date variables in Matlab but may be you can give me an advice. Regards,
Please describe the issue here.
Hello @Luislopezcmi
At a very short glance Matlab has some datetime array types, but for now the hdf5storage library which we use for .mat 7.3 file export does not support them (see https://github.com/frejanordsiek/hdf5storage/issues/112).
This means that for .mat the time_as_date option has no effect. This is also stated in the documentation https://asammdf.readthedocs.io/en/master/api.html#asammdf.mdf.MDF.export
Hello @Luislopezcmi, Matlab can read hdf5 files directly, so export hdf5 file instead of mat file might solve this issue? Import HDF5 Files in Matlab BR Matthias