taking the average of data from 500 different files
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I have 500 different files in sequential filenames in the following format: datafile_XX.mat
All of these files contain a matrix that is of size n x 8. n is changing per file. but there are 8 columns total.
I want to take the average of the first 400 rows of each file. How do i load all of these files efficiently?
0 个评论
采纳的回答
the cyclist
2015-12-11
for ni = 1:500
filename = sprintf('datafile_%03i.mat',ni);
load(filename)
% Process your stuff here
end
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!