average of n values of a dataset in a reverse direction (bottom to up )by using rolling or sliding window ????
2 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
KSSV
on 8 May 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
0 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!