Implementing the Z-transform definition of the NDFT algorithm in Matlab

366 views Asked by At

I would like to implement the following z-transform equation in MatLab to calculate the 1-D Non-Uniform Discrete Fourier Transform (NDFT):

enter image description here

source: https://books.google.com.au/books?id=givsYJZyf0gC&pg=PA326&lpg=PA326&dq=the+nonuniform+discrete+fourier+transform+and+its+applications+in+signal+processing&source=bl&ots=AJcDJ0xP0v&sig=fP15yTf-yzWSNlkC20F7K4GuCmY&hl=en&sa=X&ved=0CE8Q6AEwCWoVChMI1IyO4eWVxgIVz3m8Ch2vvgBl#v=onepage&q=the%20nonuniform%20discrete%20fourier%20transform%20and%20its%20applications%20in%20signal%20processing&f=false

X(z) is the z-transform of x[n], where x[n] is a horizontal 1-D vector that contains my unevenly spaced samples.

The z-transform is defined as a summation from n= 0 to n = infinity.

This definition is from n = 0 to n = N-1.

I have tried to implement ztrans, but isn't this definition for n = 0 to n = infinity?

Can anyone point me in the right direction into implementing this in Matlab?

1

There are 1 answers

3
user1543042 On

Using the definitions you provided this is a problem of making sure you do the matrix algebra correctly.

function X = NDFT(x, z)
    [n, Z] = meshgrid(0:length(x)-1, z);
    D = Z.^n;
    X = D*x;
end