MATLAB report

User Generated

ghgberyrpgevpny

Engineering

Description

I have the answers as well. I just want you to make the report more organized and typed. Please type the hand written part

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello! I have attached the answer in word document for you. :) Let me know if you have any further questions.

Running head: MATLAB

1

MATLAB
Name
School
Date of Submission

MATLAB
Question 1-4
MATLAB CODE
N = 1024; % N point fft
fs = 1024; % Sample Frequency
t = (0:N-1) / fs;
%% Time Domain
% Creating a one second long message signal
fm = 50; % Hertz
Am = 1;
m = Am *sin(2*pi*fm*t); % message signal
subplot(3,1,1)
plot(t,m)
xlabel('time');
ylabel('Am*sin(2*pi*fm*t)')
title('Message Signal');
% Creating a carrier signal of duration 1 second
Ac = 1; %Carrier Amplitude
fc = 400;
c = Ac*cos(2*pi*fc*t); %c is the carrier signal
subplot(3,1,2)
plot(t,c)
xlabel('time');
ylabel(' Ac*cos(2*pi*fc*t)');
title('Carrier Signal');
% Modulating the signal by multiplying the message and carrier signal
s = m.*c; %s is the modulated signal
subplot(3,1,3)
plot (t,s);
xlabel('time');
ylabel('s = m.*c')
title('Modulated Signal');
%% Frequency Domain
% The conversion from the frequency domain to the time domain is achieved
% by the use of the fast fourier transform
N = 1024;
fs = 1024;
t = (0:N-1) / fs;
% Message Signal
fm = 50; % Hertz
Am = 1;
m = Am* cos(2*pi*fm*t); % message signal
Mf = 2/N * abs(fft(m,N));
subplot (3,1,1)
plot(t(1:1000), Mf(1:1000))

2

MATLAB
xlabel('frequency');
ylabel('Amplitude');
title('Magnitude Spectrum of Message Signal');
% Carrier Signal
Ac = 1; %Carrier Amplitude
fc = 400;
c = Ac*cos(2*pi*fc*t); %c is the carrier signal
Cf = 2/N * abs(fft(c,N));
subplot(3,1, 2)
plot(t(1:1000), Cf(1:1000))
xlabel('frequency');
ylabel('Amplitude')
title('Magnitude Spectrum of Carrier Signal');
% Modulated Signal
s = m.*c; %s is the modulated signal
Sf = 2/N * abs(fft(s,N));
subplot (3,1,3)
plot(t(1:1000), Sf(1:1000))
xlabel('frequency');
ylabel('Amplitude');
title('Magnitude Spectrum of Modulated Signal');
Question 5
Explain what you see in the spectrum of the modulated signal and how it relates to the
spectrum of the message and carrier.
Solution
Since i...


Anonymous
Great study resource, helped me a lot.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags