Effacer les filtres
Effacer les filtres

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 vue (au cours des 30 derniers jours)
*

Réponse acceptée

KSSV
KSSV le 13 Oct 2016
d = dir('*.txt');
nfiles = length(d);
for k = 1:nfiles
data = importdata(d(k).name);
% get mean
end
Doc mean
  2 commentaires
Bhargavkrishna Kondreddy
Bhargavkrishna Kondreddy le 14 Oct 2016
Thanks for the help but i am getting an error in import data statement " reference to non existent field Imageset1_001, which is name of the first.txt file
KSSV
KSSV le 15 Oct 2016
Check is d(i).name are matching with the files in the folder?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by