I'm really confused at the moment and would quite appreciate some guidance.(adsbygoogle = window.adsbygoogle || []).push({});

I've got little to no background in Matlab and am needing to plot a simple pendulum.

I have found the equation of motion which is q(doubledot) = -(g/l)sin(beta)

I don't know how to go about this?

After declaring the variables:

runtime = 50; %duration of simulation in seconds

g = 9.8;

startingangle = 20; %starting angle in degrees

initialvelocity = 0;

length = 1;

How do I go about this?

Does anyone have any good tutorials to help me out?

I know I need to incorporate some function called ode45..

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Plotting simple pendulum

**Physics Forums | Science Articles, Homework Help, Discussion**