function dudt = F(t,u)
%
% Evaluates du/dt for the pendulum system
%
% du1/dt = u2
% du2/dt = -(g/L)*sin(u1).
%
% Inputs: t = time
% u = system vector (2x1 array) where
% u(1)=u1=theta, u(2)=u2=dtheta/dt.
%
% Output: dudt = derivative of system vector (
function dudt = F(t,u)
%
% Evaluates du/dt for the reaction tank model
%
% du/dt = (eta/V)*(cin - u) - gamma*u^2.
%
% Inputs: t = time
% u = concentration.
%
% Output: dudt = derivative of concentration.
%
% Note: Matlab's ODE solvers require us to inclu
function dudt = F(t,u)
%
% Evaluates du/dt for the plant-herbivore model
%
% du/dt = u*(1-u) - h*u/(1+c*u).
%
% Inputs: t = time
% u = plant population.
%
% Output: dudt = derivative of population.
%
% Note: Matlab's ODE solvers require us to include the
M374M
Homework #1
Logan.
Section 1.1:
1 Compute
2 There
3 For
p.8 print [p.28 ut ebook] (#31 , 42 ),
p.27 print [p.59 ut ebook] (#3, 93 , 13, 144 ).
blast energy E for each pair (t, r); exclude rst pair. Compare average with actual energy.
is a typo: e sh
%
% Program 1.
%
% A Matlab program that uses the built-in ODE solver
% 'ode45' (4th/5th order Runge-Kutta method) to solve
% the pendulum system.
%
% Here's how to get started:
%
% 1) Copy program1.m (this file) and pendulum.m
% into your working dire
M374M
Homework #2
Logan.
Section 1.2:
p.40 print [p.83 ut ebook] (#11 , 32 , 43 , 9).
1 This
problem illustrates an alternative way to identify scales. Assume A, and are positive constants.
m, x are functions of t. The notation m means dm/dt. As time t in
M374M
Homework #3
Logan.
Section 1.3:
1 This
p.53 print [p.103 ut ebook] (#1a1 ,1n1 ).
p.72 print [p.135 ut ebook] (#7d,8a2 ,9,13).
is a review question on solution methods for ODEs.
the parameter h can take any value: negative, zero or positive.
2 Assume
%
% Program 3.
%
% A Matlab program that uses the built-in ODE solver
% 'ode45' (4th/5th order Runge-Kutta method) to solve
% the plant-herbivore model.
%
% Here's how to get started:
%
% 1) Copy program3.m (this file) and plant.m
% into your working d
%
% Program 2.
%
% A Matlab program that uses the built-in ODE solver
% 'ode45' (4th/5th order Runge-Kutta method) to solve
% the reaction tank model.
%
% Here's how to get started:
%
% 1) Copy program2.m (this file) and rtank.m
% into your working dir