2

I have a set of points describing a closed curve in the complex plane, call it Z = [z_1, ..., z_N]. I'd like to interpolate this curve, and since it's periodic, trigonometric interpolation seemed a natural choice (especially because of its increased accuracy). By performing the FFT, we obtain the Fourier coefficients:

F = fft(Z);

At this point, we could get Z back by the formula (where 1i is the imaginary unit, and we use (k-1)*(n-1) because MATLAB indexing starts at 1)

                 N
   Z(n) = (1/N) sum  F(k)*exp( 1i*2*pi*(k-1)*(n-1)/N), 1 <= n <= N.
                k=1

My question

Is there any reason why n must be an integer? Presumably, if we treat n as any real number between 1 and N, we will just get more points on the interpolated curve. Is this true? For example, if we wanted to double the number of points, could we not set

                 N
   Z_new(n) =  (1/N) sum  F(k)*exp( 1i*2*pi*(k-1)*(n-1)/N), with n = 1, 1.5, 2, 2.5, ..., N-1, N-0.5, N
                k=1

?

The new points are of course just subject to some interpolation error, but they'll be fairly accurate, right? The reason I'm asking this question is because this method is not working for me. When I try to do this, I get a garbled mess of points that makes no sense.


(By the way, I know that I could use the interpft() command, but I'd like to add points only in certain areas of the curve, for example between z_a and z_b)

NNN
  • 135
  • 6

1 Answers1

3

The point is when n is integer, you have some primary functions which are orthogonal and can be as a basis for the space. When, n is not integer, The exponential functions in the formula, are not orthogonal. Hence, the expression of a function based on these non-orthogonal basis is not meaningful as much as you expected.

For orthogonality case you can see the following as an example (from here). As you can check, you can find two n_1 and n_2 which are not integer, the following integrals are not zero any more, and they are not orthogonal.

enter image description here

OmG
  • 18,337
  • 10
  • 57
  • 90
  • Oh this is a nice answer. Thanks so much! (I know follow-up questions are sometimes annoying, but,) could you suggest a way to add points like I'm trying to do here in a way that actually works? – NNN Aug 07 '17 at 14:58
  • The answer is yes, you can add points and essentially interpolate at those discrete frequencies. Check out the `czt` function if you have nodes that can be written in that form (that is, uniformly spaced in some manner). Otherwise, what you're looking for is probably a non-uniform FFT. – CKT Aug 07 '17 at 17:24