No BSD License  

Highlights from
AM, FM Familiarization

image thumbnail

AM, FM Familiarization

by

 

keep all files in a folder and run any of the test files.

test_fm()
function test_fm()

%now i am going to test the my_fmmod file by making modulating, and carrier
%signal information through this function.

%santosh shah, The LNM IIT Jaipur (India)(santosh.jnt@gmail.com) 22/04/07

Fm = 440; %modulating frequency
Fc = 2000; % carrier frequency
Fs = 50e3 ; % sampling frequency
A = 1; B = 10000; C =0; % initialization
d = 1 ; % taking the signal of d duration
 
% now time vector is 
t = linspace(0, d, d*Fs +1);

%create the modulating and modulated signal
m = .5*cos(2*pi*Fm*t);
s= my_fmmod(m, A , B , C , Fc , Fs);

%now ploting both the signal
tfplot(m, Fs, 'Vm', ' messege signal');
tfplot(s, Fs, 'Vfm', 'frequency modulated signal');

% now demodulating and ploting the original signal
v = my_fmdemod(s, Fc, Fs);
tfplot(v, Fs, 'Vdemod', 'frequency de-modulated signal');

%distiguish the signals by playing
fprintf('Playing original signal \n');
sound(m, Fs);
fprintf('Playing recovered signal \n');
sound(v, Fs);

Contact us