Returns the chirped z-transform of a set of data. The czt function is often more convenient than the standard fft functions because you can specify an arbitrary range of k.
Supported Product: FDTD, MODE, DEVICE, INTERCONNECT
out = czt(Ex,t,w);
Returns the chirped z-transform of Ex, function of t, at each desired angular frequency w. Note that w must be a linearly spaced set of angular frequencies but can cover any range. It is also possible for inverse transform, ie out=czt(Ex,w,t), see the interpolation example below for details. E can be a matrix where one of the two dimensions is the same as length. The Z-transform is computed along the dimension that matches length, and the output vector will be a matrix where the matched dimension is length(kx) and the other dimension is the same as E. This functionality allows to compute multiple 1D Z-transforms with a single function call.
The two dimensional chirped z-transform. kx and ky must be linearly spaced sets of wavenumbers but can cover any range.
This example uses the czt function to determine the frequency components of a signal, as shown in the following figure.
t=linspace(0,50,1000); # sec
f=linspace(0,3,200); # Hz
x_t=sin(t) + cos(t*2*pi); # x(t)
x_f=czt(x_t,t,f*2*pi); # x(f)
The following is an example of Fourier based interpolation. We can use the fftw function to create the w vector (option3, which shifts the data, is required). A factor of 1/N is necessary for the inverse transform. Also, notice the minus sign on the w vector for the inverse transform. It is possible to use czt to re-sample 2D data.
initial_res = 21;
final_res = 200;
# Initial data
# fourier transform
# re-sample data at 10x
y_hi=1/length(w)*czt(y_w,-w,t_hi); # inverse transform