Generation of Am Waves Using MATLAB
Generation of Am Waves Using MATLAB
AIM: Generation of AM wave with suppressed carrier. APPARATUS: 1.MATLAB R2007b V-14
2. Personal Computer 3. Power supply.
PROGRAM:
% generation of AM wave with suppressed carrier clc; clear all; close all; fc=input('Enter the carrier signal frequeny in Hz, fc='); fm=input('Enter the modulating signal frequency in Hz, fm='); m=input('Modulation index, m='); n=0:0.001:1; c=sin(2*pi*fc*n); %carrier signal M=sin(2*pi*fm*n); %modulating signal y=M.*c; %AM Signal subplot(2,1,2);plot(n,y);axis([0 1 -2 2]); ylabel('amplitude'); xlabel('time index');
WAVEFORM:
1 amplitude 0 .5 0 -0 .5 -1
0 .1
0 .2
0.3
0 .4
0 .5 tim in x e de
0 .6
0.7
0 .8
0 .9
2 amplitude 1 0 -1 -2
0 .1
0 .2
0.3
0 .4
0 .5 tim in x e de
0 .6
0.7
0 .8
0 .9
RESULT: Generation of AM signal with suppressed carrier has been done. PRECAUTIONS:
1. Turn off computer after use. 2. Keep in mind the syntax of MATLAB commands.