How does Matlab editor exactly open compressed (-V7) files

We are coding an application using the csmatio.dll
We want to compare performance in opening mat file between our app and the Matlab 2015R Editor
When Matlab Editor opens a compressed (V7) file, does it decompress the entire structure before displaying it in the Workspace or does each sub array is decompressed when needed ?
Thank you,

댓글 수: 2

The editor does not open MAT files, but only the source files, which are uncompressed text files.
Do you mean the load command?
Yes, I meant the load command
Thank you for your answer

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2023년 4월 19일

0 개 추천

As @Jan indicated, the MATLAB editor does not load .mat or .fig files.
load and openfig always load the entire variable into memory.
openvar and workspace() https://www.mathworks.com/help/matlab/ref/workspacebrowser.html only work on variables already loaded into memory.
The tools for loading that do not load all variables into memory immediately are matfile
It is not documented as to whether using whos with -file option decompresses the entire file into memory, or if load with a list of variables decompresses everything into memory first. However, we can tell by system response time that asking for information about what is stored in a .mat file does not require decompressing the entire file into memory. For example it is possible to generate symbolic expressions that are only a few kilobytes compressed but which take a couple of hours to decompress into memory; whos -file and load() with variables excluding those ones do not get loaded down for those hours.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Dates and Time에 대해 자세히 알아보기

제품

릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by