how to extraxct data from indexed mat files

조회 수: 2 (최근 30일)
Ahmed Elsayed
Ahmed Elsayed 2015년 6월 29일
댓글: Walter Roberson 2015년 6월 29일
Hello, I have high number of mat files generated by a system which indexed them. I have files (test1.mat, test2.mat,...test1000.mat) I need to run a loop to extract data from certain variables in these files and process them.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 6월 29일
  댓글 수: 1
Walter Roberson
Walter Roberson 2015년 6월 29일
You want to process a sequence of files and that shows you how to process a sequence of files.
for K = 1 : 1000
filename = sprintf('test%d.mat', K);
data = load(filename);
disp(size(data.VariableName)); %do something with the data fetched from the file saved as VariableName
end

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

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by