odes_pendulum
odes_pendulum,
considers a variety of topics related to the solution of the pendulum
problem and its variations.
The notes:
Scripts and functions:
-
euler.m,
accepts values of yprime, n, a, b, y0,
and uses Euler's method to approximate the solution from
a to b, using n steps, initial condition y0, and the
derivative function yprime(t,y).
-
pendulum_angle_euler.m,
calls euler() to approximate linear and nonlinear pendulum problems
for a given initial input angle theta0. Try theta0 = 1, and
n = 100, 1000, 1000, and look at how plot and phase plot tell you
what's well approximated by the linear model and what's not.
-
pendulum_compare_euler.m,
calls euler() for approximate result, and compares with exact result.
-
pendulum_control_euler.m,
uses energy "jolts" to keep a pendulum from running down because
of friction.
-
pendulum_euler.m,
calls euler() with specific values of n, a, b, y0,
and plots the result.
-
pendulum_exact.m,
the exact solution to the pendulum test problem.
-
pendulum_friction_euler.m,
calls euler() for an approximate solution to the linear pendulum
with friction.
-
pendulum_friction_prime.m,
the right hand side of the equation for the linear pendulum
with friction.
-
pendulum_nonlinear_euler.m,
calls euler() with specific values of n, a, b, y0,
and plots the result.
-
pendulum_nonlinear_prime.m,
the right hand side of the nonlinear pendulum test problem.
-
pendulum_ode23.m,
calls MATLAB's ode23() with specific values of a, b, y0,
and plots the result.
-
pendulum_prime.m,
the right hand side of the pendulum test problem.
-
predator_euler.m,
calls euler() with specific values of n, a, b, y0,
for the predator problem,
and plots the result.
-
predator_prime.m,
the right hand side of the predator test problem.
Images:
-
pendulum_angle_plot.png,
compares plots of linear and nonlinear pendulum test problem.
-
pendulum_angle_phase.png,
compares phase plots of linear and nonlinear pendulum
test problem.
-
pendulum_compare_plot.png,
compares plots of computed and exact solutions of the pendulum test problem.
-
pendulum_compare_phase.png,
compares phase plots of computed and exact solutions of the pendulum
test problem.
-
pendulum_control_plot.png,
a time plot of an attempt to control the linear pendulum with friction.
-
pendulum_control_phase.png,
a phase plot of an attempt to control the linear pendulum with friction.
-
pendulum_friction_plot.png,
a time plot of the linear pendulum with friction.
-
pendulum_friction_phase.png,
a phase plot of the linear pendulum with friction.
-
pendulum_plot.png,
a plot of an approximate solution of the pendulum test problem.
-
pendulum_nonlinear_plot.png,
a plot of an approximate solution of the nonlinear pendulum test problem.
-
pendulum_nonlinear_phase.png,
a phase plot of an approximate solution of the nonlinear pendulum test
problem.
-
pendulum_ode23_plot.png,
a plot of the solution from ode23() of the pendulum test problem.
-
pendulum_ode23_phase.png,
a phase plot of the solution from ode23() of the pendulum test problem.
-
pendulum_phase.png,
a phase plot of an approximate solution of the pendulum test problem.
-
predator_plot.png,
a plot of an approximate solution of the predator test problem.
-
predator_phase.png,
a phase plot of an approximate solution of the predator test problem.
-
wrecking_ball.png,
an image of a wrecking ball.
Last revised on 04 November 2019.