Mean column with step
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
tilfani oussama
am 28 Aug. 2018
Kommentiert: Matt J
am 28 Aug. 2018
I have a column vector of n elements, i would like to calculate the mean with a step of 10 (the mean of 10th, 20th, and so on). thanks
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Matt J
am 28 Aug. 2018
Bearbeitet: Matt J
am 28 Aug. 2018
Assuming n is a multiple of 10 (otherwise you should pad the vector), you can use SEPBLOCKFUN (Download),
out = sepblockfun(theVector,[10,1],'mean')
1 Kommentar
Matt J
am 28 Aug. 2018
tiffani commented
I think this is not my aim, the output will be a simple number, which is the mean each 10th elements in the vector, with this function sepblockfun i get a vector as output
Siehe auch
Kategorien
Mehr zu NaNs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!