Can you make the Simulink "to file" block not compress data?

3 次查看(过去 30 天)
I'm running iterative simulations in Simulink and writing data from the model to a .mat file. It appears that writing to .mat files is rather slow on R2017b.
I know that modern versions of .mat files are compressed, which makes writing them slower than writing to older .mat formats.
To save time discussing other methods, there appears to be no way of writing data to the workspace from a Simulink model when fast-restart is activated and the model is invoked from outside the base workspace.
So my question is simply - can I force the "to file" block in Simulink to write data to a v6 version of a .mat file?
Many Thanks, Adam

回答(1 个)

Adam Chapman
Adam Chapman 2018-2-15
Just answered my own question. In the documentation:
"Compressing MAT-File Data To avoid the overhead of compressing data in real time, the To File block writes an uncompressed Version 7.3 MAT-file. To compress the data within the MAT-file, load and save the file in MATLAB. The resaved file is smaller than the original MAT-file that the To File block created, because the Save command compresses the data in the MAT-file."
It appears I am already saving the uncompressed version. Shame it is so slow :(

类别

Help CenterFile Exchange 中查找有关 Interactive Model Editing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by