Program Code
clc;close all;
clear all;
% AM signal generation
fc=input('Please enter the carrier signal frequency in Hz,fc=');
fm=input('Please enter the modulating signal frequency in Hz,fm=');
m=input('Modulation index,m=');
n=0:0.001:1;
c=sin(2*pi*fc*n);
M=sin(2*pi*fm*n);
y=(1+m*M).*c;
subplot(211);
plot (n,y);
ylabel('Amplitude');
xlabel('Time index');
title('Amplitude Modulated signals');
y1=M.*c;
subplot(212);
plot(n,y1);
ylabel('Amplitude');
xlabel('Time index');
title('supressed Carrier');
Example of Output
Please enter the carrier signal frequency in Hz,fc=50
Please enter the modulating signal frequency in Hz,fm=5
Modulation index,m=.5
__________________________
No comments:
Post a Comment
Please write your opinion about this MATLAB program here, only in English.