How to create a datetime array in C++
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
James
am 2 Feb. 2023
Beantwortet: Steven Lord
am 2 Feb. 2023
Is there a way to write a C++ function that will write a datetime array to a .mat file?
0 Kommentare
Akzeptierte Antwort
Steven Lord
am 2 Feb. 2023
The datetime function supports the Extended Capability of C/C++ Code Generation (with some limitations listed on its documentation page) but save does not support C/C++ Code Generation. Looking at the list of Data Import and Export functions that support C/C++ Code Generation you may be able to write the datetime objects as text to a file using the low-level file I/O functions fopen, fprintf, and fclose.
Alternately you could write a MEX-file that calls into MATLAB to create the datetime array and save them to a MAT-file, but if you're going to do that why not just write a MATLAB function file to do the job?
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Call C++ from MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!