# MATLAB center frequency shift

I am wondering how to shift the center frequency of the below complex data from 0, to say 20 MHz (10 MHz to 30 MHz- 20 MHz bandwidth). I tried to change the indexing of the bins but I could not get it to shift. I understand fftshift shifts frequencies about 0 Hz, any way to shift the whole spectrum to something other than 0?

nFFTSize = 64;
subcarrierIndex = [-26:-1 1:26];
nBit = 1000;
ip = rand(1,nBit) > 0.5;
nBitPerSymbol = 52;
nSymbol = ceil(nBit/nBitPerSymbol);

ipMod = 2*ip - 1;
ipMod = [ipMod zeros(1,nBitPerSymbol*nSymbol-nBit)];
ipMod = reshape(ipMod,nSymbol,nBitPerSymbol);

st = [];

for ii = 1:nSymbol

inputiFFT = zeros(1,nFFTSize);

% assigning bits a1 to a52 to subcarriers [-26 to -1, 1 to 26]
inputiFFT(subcarrierIndex+nFFTSize/2+1) = ipMod(ii,:);

%  shift subcarriers at indices [-26 to -1] to fft input indices [38 to 63]
inputiFFT = fftshift(inputiFFT);

outputiFFT = ifft(inputiFFT,nFFTSize);

% adding cyclic prefix of 16 samples
outputiFFT_with_CP = [outputiFFT(49:64) outputiFFT];

st = [st outputiFFT_with_CP];

end

st2 = st*exp(2*pi*20*i*.0000032);

scatterplot(st2), grid; Let $A(t)$ be an unspecific baseband signal. You multiply in time domain with a complex exponential and the result will be the bandpass signal: $$y(t) = A(t)e^{j2\pi ft} = A(t)*\cos(2\pi ft) + j*A(t) \sin(2 \pi ft)$$ Since cos and sin both contain only a single frequency component, a fourier transform (if you look at the real part) will result in two impulses at $\pm f$ and the spectrum of $A(t)$ shifted to $\pm f$.