- #1
tigertan
- 25
- 0
I'm really confused at the moment and would quite appreciate some guidance.
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..
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..