Below is a good starting point for your program:
% Clear and initialize variables
clear
close all
hold off
N=2^18; % Number of sample points
Fs=2^14; % sample frequency is 16,384 Hz is to be power of 2
% because we are using the FFT and not the DFT
Ts=1/Fs;
fc=1000; % carrier frequency is 1 kHz
fm=100; Ac=10; % message frequency is 100 Hz, amplitude is 10
mu2=1.0; % 100% modulation
mu1=0.5; % 50% modulation
t=(0:N-1)*Ts; % Time vector
a complete executable matlab code is pasted below
(more…)