%% Specifying the correct sampling frequency

display('To set the correct sampling frequency, press return');
pause
%
% Compute the spectrum with a sampling frequency specified
%
ch=6;% trial number
delay_samples=1001:2000; % delay period sample numbers
data=dlfp1t(delay_samples,ch); % data in delay period
params.Fs=1000; % sampling frequency
[S,f]=mtspectrumc(data,params);
%
% Plot the spectrum
%
plot_vector(S,f,[],[],'y');
set(gca,'FontName','Times New Roman','Fontsize', 16);
xlabel('frequency Hz'); ylabel('Spectrum dB');
title('LFP spectrum for 1 trial using the correct sampling frequency');
position_figure;