Clear Filters
Clear Filters

i had 200 .txt files each having four columns and 2000 rows . i want to import them into matlab and find average of each column .Please help me in coding this

1 view (last 30 days)

Accepted Answer

KSSV on 13 Oct 2016
d = dir('*.txt');
nfiles = length(d);
for k = 1:nfiles
data = importdata(d(k).name);
% get mean
Doc mean

More Answers (0)


Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!