Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

AM coherent demodulation code

조회 수: 1 (최근 30일)
Anil Cayir
Anil Cayir 2020년 5월 3일
마감: Ameer Hamza 2020년 5월 4일
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')

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by