function [m_isis, cv_isis] = lif_syn_fig t_peak = 1; %peak time in ms g_max = 1; %peak conductance in nS [t_syn, g_syn_ex] = alpha_syn(t_peak,g_max); t_max = 1000; %max time in ms. t_step = 0.01; %time step in ms nsyn = 1000; %number of excitatory synapses v_rev = 70; %excitatory reversal potential (mV), relative to rest %rho = 5.1; rho_vect = 5.5:0.5:7.5; for i = 1:length(rho_vect) [t_vect,syn_vect] = syn_act(t_max,t_step,rho_vect(i),nsyn); syn_vect2 = conv(syn_vect,g_syn_ex); syn_vect2 = syn_vect2(1:length(t_vect)); [v_lif, spk_lif] = liandfr3(t_vect,syn_vect2, v_rev); t_spks = t_vect(find(spk_lif>0.5)); isis = t_spks(2:end) - t_spks(1:end-1); m_isis(i) = mean(isis); s_isis(i) = std(isis); cv_isis(i) = s_isis/m_isis; end; %figure(1); %plot(m_isis,cv_isis,'or');