% % %Solution to exercise 1, fifth exercise serie, part b % %F. Gabbiani 11/13/08 % %Uses 2 additional file: % % alpha_syn: to compute the time course % of the alpha synapse activation % % syn_act: to generate random synaptic events % %excitatory AMPA synapse t_peak = 1; %in msec g_max = 1; %in nS [t_syn, g_syn] = alpha_syn(t_peak,g_max); t_max = 1000; %in msec t_step = 0.01; %in msec nsyn = 1000; %number of simulated synapses rho_vect = 5.5:1:8.5; %number of activations per sec per synapse col_vect = ['k' 'r' 'g' 'b']; figure(1); for i = 1:4 [t_vect,syn_vect] = syn_act(t_max,t_step,rho_vect(i),nsyn); %compute synaptic conductance due to random activation pattern syn_vect2 = conv(syn_vect,g_syn); syn_vect2 = syn_vect2(1:length(t_vect)); %truncates to appropriate size %plot the conductance time course subplot(4,1,i); plot(t_vect,syn_vect2,col_vect(i)); end; xlabel('time (ms)'); ylabel('total conductance (nS)');