Here is the coding for the Amplitude modulation for the matlab programming. We assume that you already know the basics. However for this time, I am explaining some of the terms used above.
Fs denotes Sampling frequency.
Fc Denotes Carrier Frequency.
t is time.
x and y are the axis.
Y= ammod(x,fc,fs) is the code for ammod.
Fs = 8000;
Fc = 300;
t = [0:.1*Fs]’/Fs;
x = sin(20*pi*t);
y = ammod(x,Fc,Fs);
title(‘comparison of different amplitude modulation on different sampling frequency’)
Here is the graph that will look like this:
If there is any error let me know in comments and if you found the solutions please do tell so.