Estimate the maximum value among three consecutive values in a vector
Show older comments
Hello, I need to do some calculation on each value for each vector. For example, the vector A may contain hundreds of acceleration values:
A=[0.18, 0.01, -0.15, 0.08, .25, 0.12, ......]
I need to abtain a new vector which contains the max value of each three consecutive values of the vector like this:
B=[max(0.18,0.01,-0.15), max(0.01, -0.15,0.08), max(-0.15,0.08,0.25) ...... end=length signal(A)]
I would appreciate your help
Best
Accepted Answer
More Answers (1)
%Random data for example
x = 1:10;
y = movmax(x,3,'Endpoints','discard')
1 Comment
Jorge Luis Paredes Estacio
on 17 Jul 2023
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!