Azzera filtri
Azzera filtri

average of n values of a dataset in a reverse direction (bottom to up )by using rolling or sliding window ????

2 visualizzazioni (ultimi 30 giorni)
Hi, i have one query i have dataset of one column and i want to take average of every n values in a reverse direction (bottom to up) by using rolling/sliding window. can you please help me how can i do that
thanks

Risposte (1)

KSSV
KSSV il 8 Mag 2018
n = 100 ;
idx = 1:n ;
A = fliplr(idx) ;
nt = 5 ; % every nth value average
ind = reshape(1:n,nt,[])' ;
A(ind)
To get average use mean. Read about mean

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by