No BSD License  

Highlights from
AM, FM Familiarization

image thumbnail

AM, FM Familiarization


Santosh Shah (view profile)


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

function test_file_am()
%this is the test file for modulating and demodulatin the music signal of
%20 second length.

%santosh shah, The LNM IIT Jaipur (India)( 20/04/07

fsamp = 100e3; %sampling frequency taken 44kHz.
K = 1; A =1 ; fcarr = 20e3; Down_samp = 2;
test_data = 'E:\MATLAB\SDR_course\october31\my_speech.wav';
siz = wavread(test_data, 'size');
[data, fcar] = wavread(test_data);
x = [data]' ; % coulnm to row vector conversion
sound(x, fcar);

% plot in time and frequency domain.
%tfplot(x, fcar, 'Vmusic', 'Music for test');

%now calling the function ammod for modulating the music.
s= my_ammod(x, K, A, fcarr, fsamp);

% plot both messege and modulate d signal
tfplot(x, fsamp, 'Vmusic', 'music signal');
tfplot(s, fsamp, 'Vam', 'modulated signal');

% now i am going to demodulate the original music
s_demod = my_amdemod(s, fcarr, fsamp);

%ploting the original signal and its spectrum
tfplot(s_demod, fsamp, 'Vmusic', 'recovered music signal');
sound(downsample(s_demod,Down_samp), fcar / Down_samp);

Contact us