12.07.2015 Views

Dynamical Systems in Neuroscience:

Dynamical Systems in Neuroscience:

Dynamical Systems in Neuroscience:

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Solutions to Exercises, Chap. 10 513hold off;The call of the function is isochrons(’F’,0:0.1:2*pi,[1;0]); withfunction dx = F(t,x);z=x(1)+1i*x(2);dz=(1+1i)*z-z*z*conj(z);dx=[real(dz); imag(dz)];4. (Hoppensteadt and Keener 1982) From calculus, B · C = |B| |C| cos(ψ). S<strong>in</strong>ce |B| = 1 andC = (A + cos ϑ, s<strong>in</strong> ϑ), see Fig. 10.46, we have B · C = A cos ϑ + cos 2 ϑ + s<strong>in</strong> 2 ϑ. Hence,cos ψ = (1+A cos ϑ)/ √ 1 + 2A cos ϑ + A 2 . When ϑ is <strong>in</strong> the upper (lower) half-plane, the phaseis delayed (advanced).5. An example is the file prc.mfunction PRC=prc(F,phases,x0,A)% plot phase-resett<strong>in</strong>g curve (PRC) of system x’=F(t,x) + A delta(t)% at po<strong>in</strong>ts given by the vector ’phases’.% ’x0’ is a po<strong>in</strong>t on the limit cycle with zero phase% A is the strength of stimulation (row-vector)% use peaks of spikes to f<strong>in</strong>d the phase differencesT= phases(end); % is the period of the cycletau = T/6000; % time step of <strong>in</strong>tegrationk=3;% the number of cycles needed to determ<strong>in</strong>e the new phasePRC=[];[tc,lc] = ode23s(F,0:tau:k*T,x0); % f<strong>in</strong>d limit cyclepeak=1+f<strong>in</strong>d(lc(2:end-1,1)>lc(1:end-2,1)&lc(2:end-1,1)>=lc(3:end,1));peak0 = tc(peak(end)); % the last peak is used for referencefor i=1:length(phases)[m,j]=m<strong>in</strong>(abs(phases(i)-tc));[t,x] = ode23s(F,phases(i):tau:k*T,lc(j,:)+A); % stimulatepeaks=1+f<strong>in</strong>d(x(2:end-1,1)>x(1:end-2,1)&x(2:end-1,1)>=x(3:end,1));PRC=[PRC, mod(T/2+peak0-t(peaks(end)),T)-T/2];subplot(2,1,2);drawnow;plot(phases(1:length(PRC)),PRC);xlabel(’phase of stimulation’);ylabel(’<strong>in</strong>duced phase difference’);subplot(2,1,1);plot(tc,lc(:,1),’r’,t,x(:,1),t(peaks(end)),x(peaks(end),1),’ro’);xlabel(’time’);ylabel(’membrane potential’);end;An example of a call of the function is PRC=prc(’F’,0:0.1:2*pi,[-1 0],[0.1 0]); withfunction dx = F(t,x);z=x(1)+1i*x(2);dz=(1+1i)*z-z*z*conj(z);dx=[real(dz); imag(dz)];6.grad ϑ(x) ==( ϑ(x + h1 ) − ϑ(x), . . . , ϑ(x + h )m) − ϑ(x)h 1h m( PRC1 (ϑ(x), h 1 ), . . . , PRC )m(ϑ(x), h m )h 1 h m

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

Saved successfully!

Ooh no, something went wrong!