Step 2: Choosing the Wave
In order to make sure that everything looked right, I made a function in Matlab to animate a plot of a pendulum wave. Below are the function (PWT.m) and a video of what the wave should look like from the top view.
In addition to animating a plot of the wave, this finction also records a video. Due to everyone's systems running at different speeds, the "pause()" function in the script will almost inevitably need to be adjusted to give an accurate representation of the animated wave by accounting for computer delay. The video recorder function, however, will record at the actual speed, so I suggest using it to fine tune your pendulum wave rather than the animation.
To generate the movie shown above, after the function is copied into your matlab directory, type:
To better understand the function, type
>> help PWT()
in Matlab after the function has been imported.