Message Boards Message Boards

How to plot a multiple function at fixed point

Posted 9 years ago

Hi,

Imagine I have a wire where I know the function that describe the position of that over time of multiple points on the string i.e Point 1 = 0 at x=0 Point 2 = 2 sin (t) at x = .5 Point 3 = 2.5 cos (t) at x = 1 Point 4 = 0 at x = 1.5

I would like to make one single plot that show/animate the position of all these 4 points from time 0 to 5. The example of the ListAnimate command is similarly what I am shooting for.

Any help is appreciated.

Thanks.

POSTED BY: Niven Le
Animate[
 Grid[{
   {Row[{"time ", NumberForm[t, {2, 3}]}]},
   {ListLinePlot[{{0, 0}, {0.5, 2 Sin[t]}, {1, 2.5 Cos[t]}, {1.5, 0}}, 
     PlotRange -> {{0, 1.5}, {-3, 3}}, Mesh -> All]}
   }
  ], {t, 0, 5, .05}]

enter image description here

POSTED BY: Nasser M. Abbasi
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