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

조회 수: 5 (최근 30일)
Adam Chapman
Adam Chapman 2018년 2월 15일
답변: Adam Chapman 2018년 2월 15일
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