concatenation of multiple .mat file into one matrix

1 回表示 (過去 30 日間)
maha lakshmi
maha lakshmi 2013 年 2 月 21 日
sir,I have calculated the feature vector for 1000 images,my feature vector size for one image is <1x120>,how to concatenate 1000 .mat file into one for the retrieval of query image from the database.

回答 (2 件)

Walter Roberson
Walter Roberson 2013 年 2 月 21 日

Thorsten
Thorsten 2013 年 2 月 21 日
d = dir('*.mat');
Xall = nan(120, 1000);
for i = 1:length(d)
load(d(i).name)
Xall(:, i) = X; % assuming that the 1x120 vectores are stored in X
end
  2 件のコメント
maha lakshmi
maha lakshmi 2013 年 2 月 22 日
In load(d(i).name) can you please tell what does 'name' represents.
Walter Roberson
Walter Roberson 2013 年 2 月 22 日
Please read the documentation for the dir() command.

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

カテゴリ

Help Center および File ExchangeImages についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by