Hello,
I'd like to plot a decaying exponential function similar to this plot, while being able to vary the spike time and rate of decay as well as the amplitude.
I tried to use the following script but it does not produce a similar plot
t=0:100;spike_time = 20;spike_peak =0.2;spike_decay =5;g = zeros(length(t),1);for k = 1:length(t) if t(k) <= spike_time g = 0; else g = spike_peak*exp(-(t-spike_time)/spike_decay); endendplot(t,g)
Best Answer