0% found this document useful (0 votes)
2 views4 pages

LIST 3 Ans

The document outlines a digital signal processing course unit by Atagwireho Male Thomas, detailing the computation of the Discrete Time Fourier Transform (DTFT) and the Discrete Fourier Transform (DFT) using MATLAB. It includes code snippets for defining signals, computing transforms, and plotting their magnitude and phase. Additionally, it presents figures demonstrating linear and circular convolution in MATLAB.

Uploaded by

Meregulwa Allan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

LIST 3 Ans

The document outlines a digital signal processing course unit by Atagwireho Male Thomas, detailing the computation of the Discrete Time Fourier Transform (DTFT) and the Discrete Fourier Transform (DFT) using MATLAB. It includes code snippets for defining signals, computing transforms, and plotting their magnitude and phase. Additionally, it presents figures demonstrating linear and circular convolution in MATLAB.

Uploaded by

Meregulwa Allan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

COURSE UNIT: DIGITAL SIGNAL PROCESSING

NAME: ATAGWIREHO MALE THOMAS

REGNO: 2101600255

LIST 3

1|Pa ge
No.1 a)

% Define the signal

n = 0:100;

x = cos((25*pi*n)/400);

% Compute the DTFT

N = 1024; % Number of frequency points

omega = linspace(-pi, pi, N);

X = zeros(1, N);

for k = 1:N

X(k) = sum(x .* exp(-1j*omega(k)*n));

end

% Plot the magnitude and phase (zoomed


in)

zoom_range = [-0.2*pi, 0.2*pi]; % Zoom


around the frequencies of interest

figure;

subplot(2,1,1); Figure 1 shows the magnitude and phase plot of No.1

plot(omega, abs(X));

xlim(zoom_range); % Zoom in on the


frequency range

title('Magnitude of DTFT ');

xlabel('Frequency (\omega)');

ylabel('|X(e^{j\omega})|');

subplot(2,1,2);

plot(omega, angle(X));

xlim(zoom_range); % Zoom in on the


frequency range

title('Phase of DTFT );

xlabel('Frequency (\omega)');

2|Pa ge
N0.1 b)

% Define the signal

n = 0:100;

x = cos((25*pi*n)/400);

% Compute the DFT with N=16

N = 16;

X = fft(x, N);

% Frequency axis

k = 0:N-1;

omega = 2*pi*k/N;

% Plot the magnitude and phase

figure;

subplot(2,1,1);

stem(omega, abs(X)); Figure 2 shows the magnitude and phase of a DFT


title('Magnitude of DFT (N=16)');

xlabel('Frequency (\omega)');

ylabel('|X[k]|');

subplot(2,1,2);

stem(omega, angle(X));

title('Phase of DFT (N=16)');

xlabel('Frequency (\omega)');

ylabel('Phase (radians)');

ylabel('Phase (radians)');

3|Pa ge
No.2 c)

Figure 3 shows the linear convolution computation


with matlab

No.2 d)

Figure 4 is an illustration of circular convolution in


matlab

4|Pa ge

You might also like