Message Boards Message Boards

GROUPS:

Plot the following trigonometric function over time?

Posted 1 month ago
239 Views
|
4 Replies
|
0 Total Likes
|

I'm currently stuck on an exercise where I should plot the function: f(t) = sin(30·2πt)+sin(32·2πt) during the interval 0 < t < 1.5. And then I should decide the frequence of the two superposed oscillations which can be read from the graph. Is that the min, and max value?

My code right now:

 Plot[Sin[60*Pi*t] + Sin[64*Pi*t], {t, 0, 1.5}]

This gives me this graph:

enter image description here

Thanks in advance

4 Replies

To use Manipulate, need to decide which are the "control" variables. These are the variables you'd like to change during the simulation. i.e. the ones that have a slider or check box, etc... associated with them. In your case, you just then need one control variable, which is time range. In this case you can write

Manipulate[
Plot[Sin[60*Pi*t]+Sin[64*Pi*t],{t,0,tMax},
Frame->True,
FrameLabel->{{"f(t)",None},{"time (sec)",None}},
BaseStyle->14,
PlotStyle->Red,
GridLines->Automatic,GridLinesStyle->LightGray,
PlotRange->{Automatic,{-2.1,2.1}},
ImageSize->400]
,
{{tMax,1,"time"},0,1.5},
Alignment->Center,
ImageMargins->0,
FrameMargins->0,
Paneled->True,
Frame->False,
SynchronousUpdating->False,SynchronousInitialization->False
]

which gives

enter image description here

If you want also to change say the frequency and see what happens, then add another control variable and make new slider, and so on.

Posted 1 month ago

If you look at my edited post, it turns out that I dont have to use Manipulate. I need to decide the frequence of the two superposed oscillations which can be read from the graph. Is that the min, and max value?

This is not a Mathematica question. It is a math question.

@Jhn Snd, Welcome to Wolfram Community! This forum permits only questions about Wolfram Technologies. Post elsewhere for other subjects, including general math, science & technology. Please read the rules: http://wolfr.am/READ-1ST

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract