function plotAmpAvgHist(amplitudes,x)

amplitudes = cell2mat(amplitudes);
n = length(amplitudes)/30

miniAvg = mean(amplitudes);
miniStderr = std(amplitudes)/sqrt(n);

bar(x,miniAvg);hold on;
errorbar(x,miniAvg,miniStderr)


ylabel('Amplitude (pA)');

end
