| Contents | Index |
y=czt(x,m,w,a)
y=czt(x)
y = czt(x,m,w,a) returns the chirp z-transform of signal x. The chirp z-transform is the z-transform of x along a spiral contour defined by w and a. m is a scalar that specifies the length of the transform, w is the ratio between points along the z-plane spiral contour of interest, and scalar a is the complex starting point on that contour. The contour, a spiral or "chirp" in the z-plane, is given by
z = a*(w.^-(0:m-1))
y = czt(x) uses the following default values:
m = length(x)
w = exp(-j*2*pi/m)
a = 1
With these defaults, czt returns the z-transform of x at m equally spaced points around the unit circle. This is equivalent to the discrete Fourier transform of x, or fft(x). The empty matrix [] specifies the default value for a parameter.
If x is a matrix, czt(x,m,w,a) transforms the columns of x.
Create a random vector x of length 1013 and compute its DFT using czt:
randn('state',0);
x = randn(1013,1);
y = czt(x);
Use czt to zoom in on a narrow-band section (100 to 150 Hz) of a filter's frequency response. First design the filter:
h = fir1(30,125/500,rectwin(31)); % filter
Establish frequency and CZT parameters:
fs = 1000; f1 = 100; f2 = 150; % in hertz m = 1024; w = exp(-j*2*pi*(f2-f1)/(m*fs)); a = exp(j*2*pi*f1/fs);
Compute the frequency response of the filter using fft and czt:
y = fft(h,1000);
z = czt(h,m,w,a);
fy = (0:length(y)-1)'*1000/length(y);
fz = ((0:length(z)-1)'*(f2-f1)/length(z)) + f1;
subplot(211);
plot(fy(1:500),abs(y(1:500))); axis([1 500 0 1.2])
xlabel('Hz'); ylabel('Magnitude');
title('Magnitude Response using FFT')
subplot(212);
plot(fz,abs(z)); axis([f1 f2 0 1.2])
xlabel('Hz'); ylabel('Magnitude');
title('Magnitude Response using CZT ')

czt uses the next power-of-2 length FFT to perform a fast convolution when computing the z-transform on a specified chirp contour [1].
If m, w, or a is not a scalar, czt gives the following error message:
Inputs M, W, and A must be scalars.
[1] Rabiner, L.R., and B. Gold. Theory and Application of Digital Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1975. Pgs.393-399.

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |