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

5 visualizaciones (últimos 30 días)
Adam Chapman
Adam Chapman el 15 de Feb. de 2018
Respondida: Adam Chapman el 15 de Feb. de 2018
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

Respuestas (1)

Adam Chapman
Adam Chapman el 15 de Feb. de 2018
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 :(

Categorías

Más información sobre Interactive Model Editing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by