function [fvec, fftfreq] = singsidefft(inputvec)
%log of single sided fft spectrum
global fs
fftlen = length(inputvec);
fvec = fs*(0:(fftlen/2))/fftlen;
afft1 = fft(inputvec,length(inputvec),2);
a2fft1 = abs(afft1/fftlen); % two sided spectrum of the fft
a1fft1 = a2fft1(:,1:fftlen/2+1); % single sided spectrum based on P2samp1
a1fft1(:,2:end-1) = 2*a1fft1(:,2:end-1);
fftfreq = a1fft1;

end
