Two examples of frequency manipulation

function MinesMagPlotFFT(Y,Fs)
% plots the magnitude of the FFT Y
% for a sampling frequency Fs
L = length(Y);
Y = Y/L; % normalize the fft with the integration step
L1 = floor(L/2);
f = Fs/2*linspace(0,1,L1+1); % frequency range
plot(f,2*abs(Y(1:L1+1)))
title('Single-Sided Amplitude Spectrum of y(t)')
xlabel('Frequency (Hz)')
ylabel('|Y(f)|')
axis tight ;