Note: This questions is quite different from the ones referred to in the comments. Those deal with numerical questions, while this one is algebraic.
I have plots of the following type:
Plot[Cos[50 t] + Cos[51 t], {t, 0, 10}]
I would like to plot a envelope over this plot, i.e. another plot that joins all of maxima and minima of this plot respectively. Here is my attempt, but it's not exactly what I'd like:
Plot[{Cos[50 t] + Cos[51 t], Cos[t] + 1.5, -Cos[t] - 1.5}, {t, 0, 10}]
How can I generate the actual envelope?
Answer
Playing with the manipulate below might help. It's based on the the acoustics of beats.
Manipulate[Plot[
{Cos[a*t] + Cos[b*t], 2*Cos[(b - a) t/2], -2*Cos[(b - a) t/2]}, {t, 0, 10},
PlotStyle -> {
Directive[Opacity[0.7]],
Directive[Black, Thick],
Directive[Black, Thick]}],
{{a, 20}, 1, 50}, {{b, 21}, 1, 50}]
Comments
Post a Comment