Retrieve list of fieldnames in a .mat file; PLEASE HELP!

25 ビュー (過去 30 日間)
Michael
Michael 2014 年 10 月 3 日
回答済み: Star Strider 2014 年 10 月 4 日
Hi,
I know that if I use the whos(x) command, where x is the matfile, that I can see the fieldnames.
if I do a=whos(x), and then look at a.name, I see the below.
ans =
close_d
ans =
trets_1d_d
....however, if i then do b=a.name, it says z is just equal to this below (1 variable):
>> z=a.name
z =
close_d
....so I am stumped. It seems like in the assigning process somehow the second variable is chopped off. And either way, i can't determine how to get at the names. I need to do this because I want to be able to trim down all the variables in a .mat file based on time interval and investment universe.
Thanks for any help.
Best, Mike

回答 (1 件)

Star Strider
Star Strider 2014 年 10 月 4 日
Instead of whos, use matfile. If I understand your Question correctly, matfile will do what you want.

カテゴリ

Help Center および File ExchangeWorkspace 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