find local max in time window
Show older comments
am trying to find the local max in time window , i know that I have to define part from the signal then use the findpeaks built in function then take the max value of it.
% code
pks_value=[];this to store the max value from the peaks
step=200;
pcg=pcg_lp2';
for i=1:200:N
temp=pcg(i:i+step);
[pks,locs] = findpeaks(temp);
pks_value(i)=max(pks);
end
it give me the error msg "Index exceeds matrix dimensions. " so how to fix it , what to change
Accepted Answer
More Answers (1)
Hasan alomari
on 5 May 2017
0 votes
Categories
Find more on Descriptive Statistics 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!