Mathematica Question: Finding local maximums

  • Mathematica
  • Thread starter dreiter
  • Start date
  • #1
32
0

Main Question or Discussion Point

Hi all! This is a generic Mathematica question, which hopefully someone can help me with! :)

I have a set of data points.
I have an interpolating function from those points.
I have a graph of that interpolation function.

The graph goes like Sin^2, and has about 10 peaks. I want to have Mathematica find those 10 peaks. FindMaximum only finds 1 peak. How can I get it to find all 10?
 
Last edited:

Answers and Replies

  • #2
29,547
5,870
I would use:

Union[Table[FindMaximum[f[x], {x, xInit}], {xInit, xMin, xMax, xStep}]]
 

Related Threads on Mathematica Question: Finding local maximums

Replies
2
Views
4K
Replies
2
Views
5K
  • Last Post
Replies
3
Views
6K
  • Last Post
Replies
10
Views
6K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
5K
  • Last Post
Replies
1
Views
1K
Top