How can I extractTimetable for DatasetRef object?

2 ビュー (過去 30 日間)
Nicolas
Nicolas 2024 年 5 月 30 日
回答済み: Nicolas 2024 年 5 月 31 日
I am starting using Simulink.SimulationData.DatasetRef objects instead of Simulink.SimulationData.Dataset object in order to have simulation results saved directly into persistent storage. However, when doing so, I am not able to use the extractTimetable function on it to have the result of the simulation as a timetable.
Any idea/workaround to do that with DatasetRef?

回答 (1 件)

Nicolas
Nicolas 2024 年 5 月 31 日
After a bit of trial-and-error, found a rather simple workaround - the trick is to load the content of the mat file to get the logsout as a Dataset:
matcontent = load(logsoutDsr.Location, logsoutDsr.Identifier); % matcontent is a struct with the content of the mat file
logsout = matcontent.logsout; % Now we are working with an actual Dataset
TT = extractTimetable(logsout);
Hope this helps!

カテゴリ

Help Center および File ExchangeSources についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by