Mathematica plot envelope data smoothing

  • Context: Mathematica 
  • Thread starter Thread starter carey1000
  • Start date Start date
  • Tags Tags
    Data Mathematica Plot
Click For Summary
SUMMARY

The discussion focuses on generating a lower envelope for a highly oscillatory plot using Mathematica. The provided code utilizes NDSolve to compute the function \[Theta][t] and its derivatives, which are then plotted over the interval from 0 to 1000. A suggested method for obtaining the lower envelope involves binning the data and selecting the minimum value from each bin. This approach is straightforward and effective for smoothing the oscillations in the plot.

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of numerical methods, specifically NDSolve in Mathematica
  • Knowledge of data binning techniques
  • Basic concepts of oscillatory functions and their properties
NEXT STEPS
  • Research "Mathematica data binning techniques" for effective data smoothing
  • Explore "Mathematica NDSolve documentation" to deepen understanding of numerical solutions
  • Learn about "envelope detection in signal processing" for advanced smoothing techniques
  • Investigate "Mathematica plotting options" to enhance visual representation of data
USEFUL FOR

This discussion is beneficial for Mathematica users, data analysts, and researchers working with oscillatory data who seek to improve their plotting techniques and data visualization methods.

carey1000
Messages
2
Reaction score
0
The following Mathematica code generates a highly oscillatory plot. I would like to plot only the lower envelope of the plot but do not know how. Any suggestions wouuld be appreciated.

tk0 = \[Theta]'[t]*\[Theta]'[t] - \[Theta][t]*\[Theta]''[t]
tk1 = \[Theta]''[t]*\[Theta]''[t] - \[Theta]'[t]*\[Theta]'''[t]
a = tk0/Sqrt[tk1]
f = Sqrt[tk1/tk0]
s =
NDSolve[{\[Theta]''[t] + \[Theta][t] - 0.167 \[Theta][t]^3 ==
0.005 Cos[t - 0.5*0.00009*t^2], \[Theta][0] == 0, \[Theta]'[0] ==
0}, \[Theta], {t, 0, 1000}]

Plot[Evaluate [f /. s], {t, 0, 1000}, Frame -> {True, True, False, False},
FrameLabel -> {"t", "Frequency"}, FrameStyle -> Directive[FontSize -> 15], Axes -> False]

Thank you, Carey
 
Physics news on Phys.org
Offhand the easiest way i can think of is to bin the data and take the min of each bin.
 

Similar threads

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