Hello everyone, how do you average the 10 largest data in u(m/s) in each .txt file in a file set? Then draw these data. Thank you very much.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Réponse acceptée
Image Analyst
le 22 Nov 2021
fileList = dir('PIV*.txt');
for k = 1 : length(fileList)
thisFileName = fullfile(fileList(k).folder, fileList(k).name);
dataStructure = importdata(thisFileName)
data = dataStructure.data;
% Get u from column 3.
u = data(:, 3);
% Get 10 largest
big10 = maxk(u, 10)
% Get the mean
mean10 = mean(big10)
end
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Distribution Plots 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!