How to find a peak in data?
1 view (last 30 days)
Show older comments
Hello My name is Anthony, I am a high school student working on a software to analyze solar flare data and autonomously find there peaks. My friend told me that I can take the derivative of each data point and see where it is undefined. Does any one know how to do this i have tried diff()?
0 Comments
Accepted Answer
Andrei Bobrov
on 12 Feb 2012
or
data = randi(179,30,1);% eg your data
d1 = [true;diff(data)>0]
out = data(strfind(d1(:).',[1,0]))
More Answers (0)
See Also
Categories
Find more on Sources 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!