How to load only one parameter from a .mat file which contains several parameter?

Hi MATLAB users,
I've got a question which really helps me to do my calculations faster.
Suppose we have a data_collection.mat file which contains:
data1 <351x40x160>
data2 <300x39x200>
data3 <400x50x520>
Suppose a .mat file even bigger in which every time I load, it takes tremendous amount of time. But in fact I need only one of parameters (such as data1). Is there any way to load ONLY this and ignore the other? By that the desired data will load much faster.
Thanks so much in advance,
Mehdi

 採用された回答

Chandra Kurniawan
Chandra Kurniawan 2011 年 12 月 30 日
S = load('data_collection.mat', 'data1')

4 件のコメント

Walter Roberson
Walter Roberson 2011 年 12 月 30 日
S = load('data_collection.mat', 'data1')
Chandra Kurniawan
Chandra Kurniawan 2011 年 12 月 30 日
Yes, that's I mean.
Sorry for little mistake :)
Chandra Kurniawan
Chandra Kurniawan 2011 年 12 月 30 日
@Mehdi : Or you can alternate
load('data_collection.mat', 'data1') directly
M G
M G 2011 年 12 月 30 日
Thanks Chandra and Walter :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by