MATLAB program for AM signal generation

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

__________________________

If you find this program code useful, then please deposit 5 Indian Rupees in my bank account, as my fee. (Citizens of Pakistan cannot do this.).
I am the woman who wrote this program code.
My name: Anju K.
My bank account number: 30221619108
Bank: State Bank of India, Chakkarakkal branch, India.
IFSC code: SBIN0070728
SWIFT code: SBININBB
BIC code: SBININBB
My email: tc9749@gmail.com .


No comments:

Post a Comment

Please write your opinion about this MATLAB program here, only in English.