Question

In: Electrical Engineering

Use MATLAB to find the 8 point DFT of x(n) = cos(2πmn/8) (m=3) for 0 ≤...

Use MATLAB to find the 8 point DFT of x(n) = cos(2πmn/8) (m=3) for 0 ≤ n ≤ 7.

Plot both x(n) and its DFT and explain your results. The "dct" and "fft" functions in MATLAB may be useful. Please post MATLAB code.

Solutions

Expert Solution

The matlab code is attached below. It is well commented and self explanatory. Following it are the screen shots of code for readability and resultant plots.

% Code starts from here

clc % Clear the command window
close all % Close any open window
n = 0:1:7; % Create index vector for n [0,7]
m = 3; % defining variable m
x = cos(2*pi*m.*n./8); % defining the signal x(n)
figure % creating a new figure
plot(n,x,'r','Linewidth',2); % plotting x[n] against n
grid on; % Turning on the grid
xlabel('Index n-->'); % labelling X axis
ylabel('Amplitude-->'); % labelling Y axis

X = fft(x); % FFT of the signal x[n]
X_mag = abs(X); % Finding the magnitude spectrum of x
figure % creating a new figure
plot(n,X_mag,'r','Linewidth',2); % plotting X against n
grid on; % Turning on the grid
xlabel('Digital frequency bin n-->'); % labelling X axis
ylabel('Magnitude-->'); % labelling Y axis

% Code ends here

Outputs

We see that there are two peaks one at n = 3 which corresponds to m = 3 and its aliased image at n = 5.


Related Solutions

Find the 10-point DFT sequence of the x [n] sequence given below. ?[?] = cos (...
Find the 10-point DFT sequence of the x [n] sequence given below. ?[?] = cos ( 3??/ 5 ) . sin( 4??/ 5 )
Find expansion of A) tan (x) about point x=0 B) cos (x) about point x=0 C)...
Find expansion of A) tan (x) about point x=0 B) cos (x) about point x=0 C) (1+x)^1/2 about point x=0
Given that Csc(x) = - 3 and Cos(x) < 0, find the exact value of each...
Given that Csc(x) = - 3 and Cos(x) < 0, find the exact value of each of the trigonometric function of x. Functions are: a. Sin(x) , b. Cos(x) , c. Tan(x) , d. Csc(x) , e. Sec(x) , f. Cot(x)
Use and provide Matlab for the following: Generate the discrete-time signal x[n] = 4 cos (2pi....
Use and provide Matlab for the following: Generate the discrete-time signal x[n] = 4 cos (2pi. 10. nT5) + 2cos(2pi. 100. nT5) + 3cos(2pi 200. nT's), with Ts0.001 sec. Display the signal in both time and frequency-domain. Assume that the 100 Hz component of x [n] is your desired signal while the other two components are noise. Design a suitable filter to extract the desired (i.e. 100 Hz) signal. Display the filter's response. Display the output signal in the frequency-domain....
Use MATLAB to plot the functions u = 2 log10(60x + 1) and υ = 3 cos(6x) over the interval 0 ≤ x ≤ 2.
Use MATLAB to plot the functions u = 2 log10(60x + 1) and υ = 3 cos(6x) over the interval 0 ≤ x ≤ 2. Properly label the plot and each curve. The variables u and represent speed in miles per hour; the variable x represents distance in miles.
MATLAB: Matrix M = [ 0 2 3 5; 7 3 8 4 ] Write one...
MATLAB: Matrix M = [ 0 2 3 5; 7 3 8 4 ] Write one command that stores all of the rows of columns 1, 2, and 3 of M into a matrix named M2.
Prove that (cos x + isin x) n = cos nx + isin nx. (Hint: Use...
Prove that (cos x + isin x) n = cos nx + isin nx. (Hint: Use Euler’s formula).
Solve cos^2(x)-cos(x)=0 for x,
Solve cos^2(x)-cos(x)=0 for x,
Find the simpli?ed expression for x[n] where x[n] = cos(0.6?n+ ?/6 )+?3cos(1.4?n+ ?/3 )?2cos(0.6?n? ?/6 )....
Find the simpli?ed expression for x[n] where x[n] = cos(0.6?n+ ?/6 )+?3cos(1.4?n+ ?/3 )?2cos(0.6?n? ?/6 ). ?
Given ? = ???+??? + ??? and ? = ???-3?? + ????. Use MATLAB to find...
Given ? = ???+??? + ??? and ? = ???-3?? + ????. Use MATLAB to find the following: a) ? + ? b) ?  ? c) ? × ? d) A unit vector in the direction of ? − 2? e) ??? f) The component of ? along ? 2. Use MATLAB to convert points ?(11,4,15), ?(10,−14,33) and ?(−33,−14,15) from Cartesian to Cylindrical and Spherical coordinates.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT