P351 Computational Modeling

advertisement
P318 Computational Modeling
Spring 2014
Week 12 Homework
Due April 7th
For this assignment, I want you to examine the solution to a system of differential equations.
The particular system is the Wilson-Cowan Oscillator, which has the following diagram.
It is defined by the following system of differential equations:
dE 1
= ( -E + S(1.6E - I + K ))
dt 5
dI 1
= ( -I + S(1.5E))
dt 10
where S(P) is the Naka-Rushton function defined by:
ì MP N
ï
S(P) = í s N + P N
ï
0
î
for P ³ 0
for P < 0
Assume K=20, M=100, N=2, σ=30.
- First, calculate the solution for E(t) and I(t) using ode45(), the built-in function in Matlab. Assume as the
starting point E(0)=10 and I(0)=50. You will need to find a range of time (and time increments) so that you see
the system behave as an oscillator (i.e., it oscillates). Plot E(t) and I(t) on a suitably-labeled graph in Matlab.
Note: In the example we discussed in class, we used ode45() with a simple differential equation having only a
single variable. This is a system of differential equations with two variables. That means that X0 will be twodimensional and that your function you pass to ode45() will need to accept a two-dimensional X and return a
two-dimensional dX.
- Second, make a phase plot for E(t) and I(t). Explore a few starting points to see how the behavior evolves over
time. Is this a cycle, a limit cycle, or a chaotic cycle?
- Third, write a function called myEuler() that has the same calling conventions as ode45(). In other words, it
should accept the same arguments and return the same arguments as ode45(). This should implement a simple
version of Euler’s method. To illustrate your version of myEuler, you will need to pass the time vector with
time steps small enough so that myEuler() produces a similar solution to ode45().
Download