Info

This question is closed. Reopen it to edit or answer.

AM Modulation to AM Demodulation

1 view (last 30 days)
Ömer Akdemir
Ömer Akdemir on 3 May 2020
Closed: Ameer Hamza on 4 May 2020
This is the code for AM Modulation. Can you write Matlab code also for AM coherent demodulation. Do not use ammode and amdemod command. You can use diff, filter and integral command in matlab code. Please give answer.
%% AM Modulation
A=0.5; %carrier amplitude;
fc= 10*10^3; %carrier frequency 10 KHz
CarrierSignal= cos(2*pi*fc*t);
ModulatedSignal = [A + signal].*CarrierSignal;
subplot(2,2,3)
plot(t,ModulatedSignal); %plot the absolute spectrum
xlabel('Time')
ylabel('Amplitude')
title('AM Modulated Signal in Time')
% Find the spectrum Modulated Signal by taking FFT
ModulatedSignalFFT=fft(ModulatedSignal,nfft);
ShifFFT = fftshift(ModulatedSignalFFT);
ABSModulatedSignalFFT=abs(ShifFFT)/N0;
freqm = (-nfft/2:nfft/2-1)/(nfft*Ts);
subplot(2,2,4)
%PlotSpectrum of the Modulated Signal
plot(freqm,ABSModulatedSignalFFT); %plot the absolute spectrum
xlabel('Frequency (Hz)')
ylabel('Amplitude')
title('Two-Sided Spectrum of AM Modulated Signal')

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!