Message Boards Message Boards

0
|
6390 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Plot the following trigonometric function over time?

Posted 5 years ago

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

POSTED BY: Jhn Doe
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 BY: Nasser M. Abbasi
Posted 5 years 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?

POSTED BY: Jhn Doe

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

POSTED BY: Daniel Lichtblau

@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

POSTED BY: Moderation Team
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