How to generate spike for infinite time

1 view (last 30 days)
Ashok Mandal
Ashok Mandal on 11 Jun 2018
I am trying to generate spikes using below code. On running this code, the spikes are generated for the range: tspan = 0:tau:100; Could you suggest me the updates needed so that the spikes get generated (graph continue plotting) for infinite time.
Parameters = [0.02 0.2 -65 6]; V=-70; u=Parameters(2)*V; Vrest = -65; VV=[]; uu=[]; tau = 0.25; tspan = 0:tau:100; T1=tspan(end)/10; % param = [alpha beta ephsilon tauH nH] % Detail param = [75000 950 16 0.021 0.2]; %Tonic Spike
for t=tspan if (t>T1) I=14; else I=0; end; V = V + tau*(param(1)*(cosh( ( V-Vrest)/param(2))-1)-param(3)-u+I); u = u + tau*param(4)*(param(5)*V-u); if V > 30 VV(end+1)=30; V = Parameters(3); u = u + Parameters(4); else VV(end+1)=V; end; uu(end+1)=u; end; plot(tspan,VV,[0 T1 T1 max(tspan)],-90+[0 0 10 10]); axis([0 max(tspan) -90 40]) xlabel('Time');ylabel('Membrane Potential'); title('SPIKES');

Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!