필터 지우기
필터 지우기

How to get the contents of mat-file without loading it?

조회 수: 69 (최근 30일)
Jette
Jette 2012년 10월 9일
이동: Adam Danz 2023년 1월 16일
Hello,
I need to handle a number of similar quite large files which contain data in 2 structures. Lets call the structures S1 and S2. Before loading all the files I'd like to see which fieldnames the structures S1 and S2 have for all my files. (The fieldnames stand for different measurement positions which might be different in different files). Is there a possibility to do this without loading the files completely?
I already tried to extract the variables contained in a file with the whos command:
s = whos('-file',filename)
varnames = {s.name}
However, this doesn't help me since I see only the structures S1 and S2 at this level.
It seems that the import wizard has access to the information I'm looking for since if I click there on one of my structures its contents is shown in the right side of the import wizard (including the size of the matrices).
I work with R2010b on Windows XP.
Jette

채택된 답변

Leonardo
Leonardo 2023년 1월 16일
이동: Adam Danz 2023년 1월 16일
For anyone getting to this results, and using newer versions of matlab, go to

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by