Question
Help solve in MATLAB

1. Let m(t) be the 2-bit modulating signal and s(t) cos(at) be carrier signal as shown in Figure 3. Plot these two signals in 2 separated figures using MATLAB with a, = 600Or rad/s and t = 0:7, :0.01 sec where fs = 10MHz be the sampling rate to satisfy Nyquist theorem. Use the zoom in tool of MATLAB to clearly look at the signal if necessary. You can use the MATLAB function below to produce the modulating signal m(t)
media%2Fcc8%2Fcc819850-191c-4936-9450-65
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hi,

As per the problem statement, Please find the solution below with in-lined comments:

Note: included zoom feature , As no mentioned like specific zoom requirements , basic zoom on implemented on both plots

Program1: Describes the Plot for Time Vs Modulation Signal as follows:

ModulationSignalPlot.m

% Plot for time Vs 2-bit modulation signal as follows


% Given frequency   in MHz so converting into Hz
% 1MHz = 10^6 Hz
fx = 10^6;
% Given time range
t = 0:1/fx:0.01;

% no of bits
n = 2;

% Finding the Modulating signal as follows
mt = ASK_Modulating_signal(n,t);

%Plot Time Vs Modulating signal
plot(t,mt,'r');
zoom on;

xlabel('Time (sec)');
ylabel('Modulation signal');
title('Time Vs Modulation ');

Please find the output below:

Program2: Plot from Time Vs Carrier Signal as follows:

CarrierSignalPlot.m

% Plot Time Vs Carrier Signal as follows

% Given frequency   in MHz so converting into Hz
% 1MHz = 10^6 Hz
fx = 10^6;
% Given time range
t = 0:1/fx:0.01;

% Given constant
wc = 6*10^3*pi;

% Given Carrier Signal function
st = cos(wc.*t);

%Plot Time Vs Modulating signal
plot(t,st,'g');
zoom on;

xlabel('Time (sec)');
ylabel('Carrier signal');
title('Time Vs Carrier');

Please find the output below:

Please find the ASK_Modulating_signal.m for reference:

function [mt] = ASK_Modulating_signal(n,t)
Amp_level = 0:1/(n-1):1;
mt = zeros(1,length(t));
lm = round(10000*rand(1, length(Amp_level)));
Idmx = round(length(t)*rand(1, length(Amp_level)));

for i=1:length(lm)
    if Idmx(i) < lm(i)
      lm(i) = round(Idmx(i)/3);
    end
   
    if Idmx(i)+lm(i)/2 > length(t)
      mt(1,Idmx(i)-round(lm(i)/2):length(t)) = Amp_level(i);
    else
      mt(1,Idmx(i)-round(lm(i)/2):Idmx(i)+round(lm(i)/2)) = Amp_level(i);
    end
end

end

Thanks

Add a comment
Know the answer?
Add Answer to:
Help solve in MATLAB 1. Let m(t) be the 2-bit modulating signal and s(t) cos(at) be...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT