# Demodulation with MATLAB

I am trying to listen VLF radio signals. I have a recorded wave file (download) and here is the frequency spectrum:

I have produced this spectrum using this matlab code:

signal= wavread('/Users/ecabuk/Downloads/DR0000_0165.wav');
X_mags = abs(fft(signal));
bin_vals = [0 : N-1];
fax_Hz = bin_vals*fs/N;
N_2 = ceil(N/2);
plot(fax_Hz(1:N_2), 10*log10(X_mags(1:N_2)))
xlabel('Frequency (Hz)')
ylabel('Magnitude (dB)');
title('Single-sided Magnitude spectrum (Hertz)');
axis tight


It has two clear picks near at ~24KHz and ~25KHz.

How can I crop 24KHz and then return to time domain and save as a wave file, so I can hear that. (and same thing for 25KHz of course)

I am not sure but am I trying to make a Demodulation process?

• Could you please review the answers and mark the one you find fits you?
– Royi
Aug 9, 2021 at 16:13
• The file isn't available anymore. Jan 22, 2022 at 16:50

1. How to extract those labeled frequencies and remove the rest of the data?
2. How to do Demodulation?

Well, regarding your first question, a dirty solution would be by working the the DFT data.
Just zero all frequencies but those you're after and apply Inverse DFT (ifft).
Leave some margin around your wanted frequencies.

About the second question, look at Wikipedia - Demodulation.

Basically, in order to shift data in the frequency domain you multiply by pure harmonic signal in the time domain.
You chose the frequency of this harmonic signal s.t. (At least this is the classic case) the frequency you want will move to the DC frequency.
Then you apply Low Pass Filter to leave only the data you wanted.

This is the opposite of the Modulation process.