Using Euler-Cromer to find the motion of a simple pendulum?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
My professor wants us to find the number of periods a simple, meter-long pendulum will have in a day if given an initial angle of 50 degrees using the Euler-Cromer method. My problem is that I can't come up with al the equations I need.
I know that I need: dθ/dt = f(t, ω) and dω/dt = g(t, θ).
I managed to get dω/dt = -9.8*sin(θ). I can't figure out what dθ/dt should be, though. Once I have that, I understand how to use for loops to find θ and ω for time steps and if statements to fin the number of periods throughout the day (even if it is inefficient), I just can't seem to get started. Can anybody give me some help as to what dθ/dt is? Remember, the starting angle is 50 degrees, so the small angle approximation cannot be used.
0 comentarios
Respuestas (1)
Matt Kindig
el 4 de Abr. de 2012
Can you use the ODE solvers built-in to Matlab (something like 'ode45')? If so, that would be the easiest way, and would avoid looping completely.
If the objective of the assignment is to implement your own ODE solver, then I would look up the definition for Runge-Kutta integration on Wikipedia or similar.
By the way, d(theta)/dt is just w (omega).
2 comentarios
Matt Kindig
el 4 de Abr. de 2012
Ah, my apologies. I realized I overlooked that you specified the Euler-Cromer method. Can you post your code for us to look over?
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!