필터 지우기
필터 지우기

Modified Signal Logging file size gets very large

조회 수: 3 (최근 30일)
Will Schulke
Will Schulke 2022년 11월 8일
답변: Dhruv 2023년 8월 31일
I have a singnal logging file generrated from a model that is about 2800 KB. I have a script that trims off the first 1 second of data to strip out iniitialization anomolies I do not care about. I also modified the data downsampling from 10 msec to 40 msec samples. When the script is complete the mat file is anywhere from 25,000, to 30,000 KB. Thsi makes the file much less shareable/portable. It would be nice to understand why the file sized increased so much and if there are any tricks?
Thanks,
Will

답변 (1개)

Dhruv
Dhruv 2023년 8월 31일
The issue of file size being increased so much is essentially because of duplication of the data. When you trim off the first 1 second of data, it’s still getting stored but just not getting included in the final file. And when you downsample the data, you are storing the same data points, just less frequently.
There are a few tricks you can use to reduce the file size:
  • Only store the data that you need. If you don't need the first 1 second of data, don't store it. And if you don't need the data at 10 msec resolution, downsample it to a lower resolution.
  • Use a lossless compression format. There are several lossless compression formats available, such as GZIP and BZIP2. These formats can significantly reduce the file size without losing any data.
  • Use a smaller data type. If the data is floating point, you can use a smaller data type, such as half precision. This will reduce the file size by half.
Hopefully the above steps will help you solve the issue!

카테고리

Help CenterFile Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by