12.07.2015 Views

Dynamical Systems in Neuroscience:

Dynamical Systems in Neuroscience:

Dynamical Systems in Neuroscience:

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

512 Solutions to Exercises, Chap. 10The phase difference between ϑ ˙ lc = 1 + d(1) 2 and ˙ϑ = 1 + dr(t) 2 grows as ˙χ = d(r(t) 2 − 1), andits asymptotic value isχ(∞) =∫ ∞Thus, on the χ-isochron, we have ϑ + d log r = χ.3. An example is the file isochrons.m0d(r(t) 2 − 1) = d log r(0) .function isochrons(F,phases,x0)% plot isochrons of a planar dynamical system x’=F(t,x)% at po<strong>in</strong>ts given by the vector ’phases’.% ’x0’ is a po<strong>in</strong>t on the limit cycle (2x1-vector)T= phases(end); % is the period of the cycletau = T/600; % time step of <strong>in</strong>tegrationm=200;% spatial gridk=5;% the number of skipped cycles[t,lc] = ode23s(F,0:tau:T,x0);dx=(max(lc)-m<strong>in</strong>(lc))’/m;center = (max(lc)+m<strong>in</strong>(lc))’/2;iso=[x0-m^0.5*dx, x0+m^0.5*dx];% forward <strong>in</strong>tegration% spatial resolution% center of the limit cycle% isochron’s <strong>in</strong>itial segmentfor t=0:-tau:-(k+1)*T% backward <strong>in</strong>tegrationfor i=1:size(iso,2)iso(:,i)=iso(:,i)-tau*feval(F,t,iso(:,i)); % move one stepend;i=1;while i1.5*m*dx) % check boundariesiso = [iso(:,1:i-1), iso(:,i+1:end)]; % removeelsei=i+1;end;end;i=1;while i 2% add a po<strong>in</strong>t <strong>in</strong> the middleiso = [iso(:,1:i), (iso(:,i)+iso(:,i+1))/2 ,iso(:,i+1:end)];end;if d < 0.5% remove the po<strong>in</strong>tiso = [iso(:,1:i), iso(:,i+2:end)];elsei=i+1;end;end;if (mod(-t,T)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!