# Frequency Shifting in MATLAB

I am currently attempting to demodulate an audio file using MATLAB. After taking the fft of the signal, I receive this:

After some more coding, I found the following values:

• Fs = 44100;

• Window size = 441000 (by taking length(signal))

• Fc = 11416

My guess is that this signal is a SSB with a full carrier, and I have read that to recover the original signal from the IF SSB signal, the SSB must be frequency shifted down to its original range of baseband frequencies.

The question here is: How could I shift the frequency spectrum of this signal to center at 0 Hz?

I have been reading up on the fft size/bins and its relationship to the sampling frequency. Will this value be needed? I have also tried using fftshift(), but to no avail. The goal here is to shift the frequencies to be centered at 0 Hz, use a filter to get rid of some of the frequencies, then use an ssb demod function to hopefully get the correct sound from it.

Thanks in advance, I appreciate you taking the time to help another guy out.

Try to remember what happens when you multiply a signal with a cosine function with a frequency of Fc.

Namely, what's the shifting operator in Frequency domain?

If we're talking on visualization, so the operator in MATLAB is called fftshift()

Enjoy...

• If I multiply the signal by a cosine function with Fc, then it creates additional signals as +/- Fc. I simply want to shift the frequency domain as it is now so that it centers at 0 Hz Jul 25, 2015 at 15:13
• Yep... Modulation is multiplication by an harmonic function, demodulation is done the same. Just pay attentions to the replications and the Sampling Rate / AA Filter. If you look at you signal it seems to be centered around ~2200 [Hz]. If you multiply by a cosine with this frequency you'll get what you want.
– Royi
Jul 25, 2015 at 16:35
• @AndrewT, Could you please mark an answer or specify what's missing? Thank You.
– Royi
Jul 13 at 4:09

In Matlab you can use the fftshift() command. It will rearrange the samples so that the frequency range is between $-f_s/2$ and $f_s/2$.