Question: This is a MATLAB question with the solution .. can someone please explain it in details, step by step .. NOTE: If you are not

This is a MATLAB question with the solution ..

can someone please explain it in details, step by step ..

NOTE: If you are not sure, plz DO NOT answer ..

The objective of this experiment is to generate a mixture of sinusoidal signals and
to verify that the spectrum is as predicted by theory

Set the sampling period to 0.5ms
Set the time interval to [0,2s]
Generate the signal x(t)= sin(2000t)+2 cos(4000t+32)+cos2(2000t)

Solution:
ts=.5/1000;t=[0:ts:2];
x=sin(2000*t)+2*cos(4000*t+32)+cos(2000*t).^2;



i) Calculate the signal power, defined as the sum of the squared terms

Solution
Power = sum(x.^2) = 14841.


ii) Plot the magnitude spectrum with the horizontal axis properly labeled in Hz.

Solution:
plot((1:length(x))/(ts*length(x)),abs(fft(x)));

iii) Perform clipping of values larger (in absolute value) than 2.5 to 2.5.
Plot the resulting magnitude spectrum. Insert here

Solution:
xx=(abs(x)<2.5).*x;
plot((1:length(x))/(ts*length(x)),abs(fft(xx)));

Step by Step Solution

3.32 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution ts51000t0ts2 0 to 2 xsin2000t2cos4000t32cos2000t2 type in the sinusoidal function i Calcula... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!