Message Boards Message Boards

0
|
4654 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Why no graph?

Posted 11 years ago
I am studying a basic Mathematica book and I am following examples and cannot get this to plot. I know its a novice question. I am using the Home Edition.

Manipulate[Plot[{Sin[2 Pi/ax], cCos[2 Pi/bx]}, {x, 0, 4 Pi},  PlotStyle -> {GrayLevel[0], GrayLevel[.5]},   PlotRange -> {-4 Pi/2, 4 Pi/2},  AspectRatio -> 1], {{a, 2 Pi, "Period for Sine"}, .1, 4}, {{b, 2 Pi, "Period for Cosine"}, .1, 5}, {{c, 2 Pi, "Amplitude for Cosine"}, .1, 5}]
POSTED BY: Scott Price
2 Replies
Posted 11 years ago
Thanks. That was it. Typing this in can be deceiving because the cursor acted like there was already a space. Obviously not. 
POSTED BY: Scott Price
Posted 11 years ago
Hey Scott,

You either need a multiplication symbol or a space between the expression and the constant you multiply the expression with.  In the code below I inserted spaces.
Manipulate[
Plot[{Sin[2 Pi/a x], c Cos[2 Pi/b x]}, {x, 0, 4 Pi},
  PlotStyle -> {GrayLevel[0], GrayLevel[.5]},
  PlotRange -> {-4 Pi/2, 4 Pi/2},
  AspectRatio -> 1], {{a, 2 Pi, "Period for Sine"}, .1,
  4}, {{b, 2 Pi, "Period for Cosine"}, .1,
  5}, {{c, 2 Pi, "Amplitude for Cosine"}, .1, 5}]


Hope it helps.
POSTED BY: Simon P.
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