0% found this document useful (0 votes)
5 views

Matlab Lab 3

Uploaded by

22119258
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)
5 views

Matlab Lab 3

Uploaded by

22119258
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/ 28

LAB 3: FREQUENCY DOMAIN 1

DO TRUNG HAU
OVERVIEW COMMANDS STEP 1 STEP N STEP 6 2

The Fourier sequence for DTFS


OVERVIEW COMMANDS STEP 1 STEP N STEP 6 3

The Fourier sequence for DTFS


OVERVIEW COMMANDS STEP 1 STEP N STEP 6 4

The Fourier transform for DTFT


OVERVIEW COMMANDS STEP 1 STEP N STEP 6 5

The Fourier transform for DTFT


OVERVIEW COMMANDS STEP 1 STEP N STEP 6 6

The Fourier transform for DTFT


OVERVIEW COMMANDS STEP 1 STEP N STEP 6 7

1 DTFT Implementation 4 DFT Properties

2 DTFT Properties 5 The Z transform

3 DFT and IDFT 6 The IZ transform


1 DTFT Implementation 1.1 COMMANDS 8

Freqz(num, den, w);

Frequency response of analog filters include the magnitude, phase,


real and imaginary part.

Pause(n);

Stop MATLAB execution temporarily.

Real(x); Imag(x); Abs(x); Angle(x);

Return the real, imaginary, magnitude and phase part of the signal
after using the command “Freqz”.
1 DTFT Implementation 1.1 COMMANDS 9

Unwrap(phase);

Correct phase angles to produce smoother phase plots.


1 DTFT Implementation 1.1 COMMANDS 10

Unwrap(phase);
1 DTFT Implementation 11
1 DTFT Implementation 12
1 DTFT Implementation 13
2 DTFT Properties 14

Fliplr(x); Flip array left to right

Eg. From x = [1 2 3 4 5], plot the x[-n] using the command “Fliplr”.

x = [1 2 3 4 5];
n = 0:4;
subplot(2,1,1);
stem(n, x, 'k');
subplot(2,1,2);
xr = fliplr(x);
nr = -4:0;
stem(nr, xr, 'k');
2 DTFT Properties 15
2 DTFT Properties 16
2 DTFT Properties 17
2 DTFT Properties 18
2 DTFT Properties 19
2 DTFT Properties 20
5 The Z transform 21

Zplane(num, den);
Zero-poles plots for filters
Zplane(zeros, poles);
5 The Z transform 22

[z p k]=tf2zp(num, den);

Convert transfer function filter parameters to zero-pole-gain form.


1  2 z 1 1 1  2 z 1
H  z   . num = [1 2];
2  2z 2
2 1  z 1 1  z 1  den = [2 0 -2];
[z p k] = tf2zp(num, den);

[num den]=zp2tf(z, p, k);

Convert zero-pole-gain filter parameters to transfer function form.


z = -2;
p = [-1 1];
k = 1/2;
[num den]=zp2tf(z, p, k);
5 The Z transform 23

Sos = zp2sos(z, p, k);


Convert zero-pole-gain filter parameters to second-order sections form.
5 The Z transform 24
5 The Z transform 25
6 The IZ transform 26

Impz(num, den); Filter impulse response.


6 The IZ transform 27
6 The IZ transform 28

[r p k] = residuez(num, den); Partial fraction expansion.

You might also like