discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Decoding fm files by MATLAB


From: Saeed Beyty
Subject: [Discuss-gnuradio] Decoding fm files by MATLAB
Date: Thu, 15 Jan 2004 06:46:40 -0800 (PST)

Dear GNURadio-ists

Somewhile ago Eric addressed a file which was the
saved samples of FM radio stations
see this:
http://mail.gnu.org/archive/html/discuss-gnuradio/2004-01/msg00008.html

I tried to decode this file and extract the voice
inside, using MATLAB package.

writting the below m.file for MATLAB, there were no
good results.
Any one can help?
1- How should i open the file? in which format i mean
2- How must i read from the file?the precision is
required. 
3- Isn't there any trasmormation neeeded before
demodulation!!?
4- When demodulated the signal, with what frequency
should it be played-back?


%% HERE IS THE MATLAB PROGRAM %%

clc
fid=fopen('C:\fm95_5.dat','r','ieee-le');
Fs=20e6;  % Sampling Frequency
Fc=5.75e6; % Center Frequency

precision='int16'; % Data Pecision format.

size=1024*20;
StepSize=1/Fs;
FinalTime=0.5;

for i=1:10
[A,count]=fread(fid,size,precision);%Reading from file
    A=-A-115;   % Transformation
    x = demod(A,Fc,Fs,'fm');

    figure(1);
    subplot(2,1,1)
     plot(x)
    subplot(2,1,2)
     plot(x)
    plot(abs(fft(x)))

    soundsc(x,22000)
        % 22KHz=22000 is selected as the playback rate
    drawnow;
end

fclose(fid);


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]