Mathematica Question: Finding local maximums

  • Context: Mathematica 
  • Thread starter Thread starter dreiter
  • Start date Start date
  • Tags Tags
    Local Mathematica
Click For Summary
SUMMARY

The discussion centers on using Mathematica to identify multiple local maxima in an interpolating function derived from a set of data points. The user seeks to find all peaks in a graph resembling Sin^2, which contains approximately 10 peaks. The proposed solution involves utilizing the Union and Table functions in conjunction with FindMaximum to systematically search for all local maxima across specified intervals. This method effectively circumvents the limitation of FindMaximum, which only identifies a single peak at a time.

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of interpolating functions in data analysis
  • Knowledge of local maxima and optimization techniques
  • Basic grasp of mathematical functions and their properties
NEXT STEPS
  • Explore the use of Mathematica's FindPeaks function for peak detection
  • Learn about the Union and Table functions in Mathematica for data manipulation
  • Investigate advanced optimization techniques in Mathematica
  • Study the properties of Sin^2 and similar functions for better peak identification
USEFUL FOR

This discussion is beneficial for data scientists, mathematicians, and researchers using Mathematica for data analysis, particularly those focused on peak detection in mathematical functions.

dreiter
Messages
33
Reaction score
0
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:
Physics news on Phys.org
I would use:

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

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K