I have Simulink models that log signal data using the Simulink.SimulationData.Dataset class.
I'm writing post-processing m-code that helps analyze model outputs and would like to combine the data into either a tscollection object or a timetable object, which is easier to deal with than the collection of Simulink.SimulationData.Signal objects contained in the logsout object generated by the Simulink model.
There doesn't seem to be an 'easy' way to convert the signals in logsout into a timetable object, whereas one can create a tscolleciton object rather easily:
tsCol = tscollection;
tsCol = tsCol.addts(logsout.getElement(ii).Values);
MathWorks seems to really be pushing the use of timetables through functions such as stackedplot, and tscollection objects seem to be something of an afterthought.
It there an easy way to convert a tscollection object into a timetable? Failing that, is there a way to create an empty timetable and add the signal data from the Dataset signals in a loop as shown above?