0

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?

James
  • 91
  • 1
  • 6

1 Answers1

0

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
user1543042
  • 3,422
  • 1
  • 17
  • 31
  • Makes sense, but how do I take into account that D is a matrix of Z-transforms with different indices ? Do I need to add the command ztrans somewhere ? – James Jun 18 '15 at 06:30
  • If `z` is a scalar `D` is a vector, if `z` is a vector `D` is a matrix. – user1543042 Jun 18 '15 at 11:17
  • I know that - I'm asking about z-transforms- z is the z-transform - how do I take that into account in matlab ? – James Jun 18 '15 at 12:21