I've been given a signal, how can I find the peaks with the islocalmax function?
Show older comments
How can I find the peaks using the islocalmax function, with the attachment below as my only source of information?
4 Comments
Image Analyst
on 21 Dec 2018
Is there something about the demo code, or your data, in the help that prevents you from using hte demo code?
Hannah Oduntan
on 22 Dec 2018
Image Analyst
on 22 Dec 2018
Edited: Image Analyst
on 22 Dec 2018
For example when the help documentation gave the example:
x = 1:100;
A = (1-cos(2*pi*0.01*x)).*sin(2*pi*0.15*x);
TF = islocalmax(A);
plot(x,A,x(TF),A(TF),'r*')
Is there some reason you couldn't replace the A with your data?
See my answer below where I did that for you.
Hannah Oduntan
on 22 Dec 2018
Accepted Answer
More Answers (0)
Categories
Find more on Descriptive Statistics 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!