Can't read timeseries generated with "to file" in Simulink
5 次查看(过去 30 天)
显示 更早的评论
hi, im developing a simple model with simulink. the model uses the "matlab function block" and other simple blocks.
i m trying to write the output of my model into a timeseries using the "to file" block .
everithing runs fine but when i try to open the timeseries in matlab i only get the visualization of the properties of the timeseries, for example:
timeseries
Common Properties:
Name: ''
Time: [11x1 double]
TimeInfo: tsdata.timemetadata
Data: [1x1x11 double]
DataInfo: tsdata.datametadata
and i cannot see the table with the data and the time intervals. (i can only get acess to the data by using, for example the command "getdatasamples") but, again, i cannot see the whole table
i tried to run the examples provided by mathworks of the timeseries and on the "to file" block and they work.
does anyone have any suggestion? thanks
0 个评论
回答(1 个)
Yash
2025-7-20
The simulation output data is present in "Data" property in the MAT file saved by the "To File" block. In your case the data is stored as a 1x1x11 3d double array. You can use MATLAB function "squeeze" to remove dimensions of length 1 to better visualize the data.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time Series 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!