how i average n values in array
Mostra commenti meno recenti
if i have data a and i want to mean or average every 10 values as 1:10, 2:11, 3:12 and as so on for length of data ?
Risposta accettata
Più risposte (2)
Star Strider
il 21 Ago 2016
‘But i need overlap between the values as 1:10 then from 2:11 and so on’
Use a moving average filter:
Heart_pulse_avg = filter(ones(1,10), 10, Heart_pulse);
1 Commento
Steven Lord
il 21 Ago 2016
Andrei Bobrov
il 21 Ago 2016
a - your vector;
out = movsum(a,[0 9],'Endpoints','discard')/10;
Categorie
Scopri di più su Resizing and Reshaping Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!