How to average the data in a large text file ?
Afficher commentaires plus anciens
I have the data in one column and 720 rows, how do i get the average of each consecutive numbers ? Example, If I have, [1,2,3,4,5,6,7,8,9,10], I want to take average of 1&2, 3&4, 5&6, 7&8, and 9&10. How to do it ?
Thanks, add.
Réponse acceptée
Plus de réponses (1)
Or:
data = 1:10;
result = mean(reshape(data, 2, []), 1);
Catégories
En savoir plus sur Cell Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!