DSPRelated.com
Forums

WARNING: Is there a use for ifft(X,M)?

Started by Greg Heath June 12, 2009
This is a followup to the thread "Why is fft(x,M) useful?

http://groups.google.com/group/comp.soft-sys.matlab/
msg/2bacfcce9454065e

As long as the N components of the time sampled row
vector function x are presented in chronological order,
the use of fft(x,M) as shorthand for the zeropadding
operation fft([x,zeros(1,M-N)]) is relatively
straightforward.

In contrast, it has been show in recent posts, e.g.,

http://groups.google.com/group/comp.soft-sys.matlab/
msg/a76d7837e3d84bcf?hl=en

that when zero padding in the spectral domain, it is
essential to add the zeros so that both the real and
imaginary parts of the result are conjugate symmetric.
When N is even, this results in the insertion of the
zeros within a two part decomposition of the Nyquist
component. However, workarounds are available when
the zeros are placed on either side of the Nyquist
component.

The purpose of this thread is to warn potential users
that none of the three techniques in the above reference
involves appending the zeros at the end of the spectrum
obtained from fft(x).

Therefore, I can find no use for ifft(X,M).

Hope this helps.

Greg
On Jun 11, 9:21 pm, Greg Heath <he...@alumni.brown.edu> wrote:
> This is a followup to the thread "Why is fft(x,M) useful? > > http://groups.google.com/group/comp.soft-sys.matlab/ > msg/2bacfcce9454065e > > As long as the N components of the time sampled row > vector function x are presented in chronological order, > the use of fft(x,M) as shorthand for the zeropadding > operation fft([x,zeros(1,M-N)]) is relatively > straightforward. > > In contrast, it has been show in recent posts, e.g., > > http://groups.google.com/group/comp.soft-sys.matlab/ > msg/a76d7837e3d84bcf?hl=en > > that when zero padding in the spectral domain, it is > essential to add the zeros so that both the real and > imaginary parts of the result are conjugate symmetric. > When N is even, this results in the insertion of the > zeros within a two part decomposition of the Nyquist > component. However, workarounds are available when > the zeros are placed on either side of the Nyquist > component. > > The purpose of this thread is to warn potential users > that none of the three techniques in the above reference > involves appending the zeros at the end of the spectrum > obtained from fft(x).
,> ,> Therefore, I can find no use for ifft(X,M). ,> ,> Hope this helps. ,> ,> Greg I can find no use for mayonnaise, but I don't post a warning to comp.dsp about it. Since you have included comp.dsp in this post and I've read the basis of your concern, why do you think those in comp.dsp need to be concerned about maintaining non-zero Nyquist components when interpolating via spectrum zero fill and ifft? Why are you? How does this help? Dale B Dalrymple
On Jun 12, 3:55 am, dbd <d...@ieee.org> wrote:
> On Jun 11, 9:21 pm, Greg Heath <he...@alumni.brown.edu> wrote: > > > This is a followup to the thread "Why is fft(x,M) useful? > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > msg/2bacfcce9454065e > > > As long as the N components of the time sampled row > > vector function x are presented in chronological order, > > the use of fft(x,M) as shorthand for the zeropadding > > operation fft([x,zeros(1,M-N)]) is relatively > > straightforward. > > > In contrast, it has been show in recent posts, e.g., > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > msg/a76d7837e3d84bcf?hl=en > > > that when zero padding in the spectral domain, it is > > essential to add the zeros so that both the real and > > imaginary parts of the result are conjugate symmetric. > > When N is even, this results in the insertion of the > > zeros within a two part decomposition of the Nyquist > > component. However, workarounds are available when > > the zeros are placed on either side of the Nyquist > > component. > > > The purpose of this thread is to warn potential users > > that none of the three techniques in the above reference > > involves appending the zeros at the end of the spectrum > > obtained from fft(x). > > ,> Therefore, I can find no use for ifft(X,M). > ,> > ,> Hope this helps. > ,> > ,> Greg > > I can find no use for mayonnaise, but I don't post a warning to > comp.dsp about it. > > Since you have included comp.dsp in this post and I've read the basis > of your concern, why do you think those in comp.dsp need to be > concerned about maintaining non-zero Nyquist components when > interpolating via spectrum zero fill and ifft? Why are you? > > How does this help?
I want all of the experts and nonexperts who read comp.dsp to understand that 1.Using MATLABs dual input option of ifft will not return a reasonable interpolation of the time function obtained when using the single input version. 2. This has nothing to do with Nyquist components. 3. I can't think of any scenario where the dual input version is of any use at all. 4. I think this is serious enough to issue a WARNING. Hope this helps. Greg
1234567890123456789012345678901234567890123456789012345
On Jun 12, 4:27 pm, "Matt " <x...@whatever.com> wrote:
> Greg Heath <he...@alumni.brown.edu> wrote in message > <8c3ffec9-42f0-4ba1-ac3c-f826d56dd...@y7g2000yqa.googlegroups.com>... > > As long as the N components of the time sampled row > > vector function x are presented in chronological order, > > the use of fft(x,M) as shorthand for the zeropadding > > operation fft([x,zeros(1,M-N)]) is relatively > > straightforward. > > > In contrast, it has been show in recent posts, e.g., > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > msg/a76d7837e3d84bcf?hl=en > > > that when zero padding in the spectral domain, it is > > essential to add the zeros so that both the real and > > imaginary parts of the result are conjugate symmetric. > > I wouldn't confine this to the spectral domain. Might > I not want to interpolate spectral samples using the > dual of this technique, by zero-padding in the > non-Fourier domain? In this case, the same concerns > apply when pre-padding fft() input.
My oersonal opinion is that the two scenarios should not be perceived as duals when, in both cases, the measurements are temporal and spectra are only obtained via the DFT of measured trmporal data. In the temporal interpolation case N equally spaced measurements of complex data are obtained during the time interval [t1:dt:t2]. However, there is no requirement that the data have conjugate symmetry nor have a special position with respect to a fixed time origin that is independent of the data. When the transform is taken, the spectral samples are equally spaced on the frequency interval [0:df:Fs-df] where Fs = 1/dt and df = 1/(t2+dt-t1). Here the first transform value is always at zero frequency regardless of any other parameters. In addition, the transforms of the real and inaginary parts of the original temporal signal have conjugate symmetry and are assumed to be periodic with period Fs. The locations of the zero and maximum frequency components are well defined. When the spectrum is zeropadded to obtain an interpolated temporal signal, the zeros must be inserted at a precise location without disturbing the conjugate symmetry of the transforms from the real and imaginary parts of the original temporal signal. This CANNOT be done using IFFT(FFT(x),M)! In the spectral interpolation case the same N equally spaced measurements of complex temporal data are obtained during the time interval [t1:dt:t2]. Again, there is no requirement that the data be conjugate symmetric nor have a special position with respect to a fixed time origin that is independent of the data. The only requirement is that the data retain the order in which they were measured. Therefore when the temporal data is zeropadded to obtain an interpolated spectrum, the zeros are naturally appended withinn the time interval [t2+dt:dt:t1+(M-1)*dt]. This CAN be done using FFT(x,M)!
> Zero-padding the symmetric sequence [a b c d c b a] > results in > [a b c d c b a 0 0 0 0 ...] > which ruins conjugate symmetry, i.e. b is not the conjugate of 0, etc...
That is precisely why you should NOT use ifft(X,M)!
> > The purpose of this thread is to warn potential users > > that none of the three techniques in the above reference > > involves appending the zeros at the end of the spectrum > > obtained from fft(x). > > > Therefore, I can find no use for ifft(X,M). > > What if the spectrum is not obtained from fft(x), but rather by some other means? For example, in MRI, spectral samples are obtained by direct measurement, and not by fft computation.
In this case it depends on how the spectrum is formatted. If it is formatted so that ifft(X) produces the temporal signal, IFFT(X,M) will probably NOT produce a desirable interpolation.
> Also, if I want to convolve two spectra X and Y each of > length M,
Do you mean length N (N<M)?
>this form still has a use > > fft( ifft(X,M).*ifft(Y,M-1))
1. The convolution length should be 2*M-1. However, can't use " .* " with different length vectors. Something needs fixing. 2. If X is of length M, ifft(X,M) is identically equal to ifft(X).
> Can I find an instance where this would be applied? > Perhaps to filter noisy spectral estimates...
OK. I understand your point, but we are concerned with details. How would you caculate the convolution using the single input option for ifft? Hope this helps. Greg
On Jun 12, 12:30 pm, Greg <he...@alumni.brown.edu> wrote:
> On Jun 12, 3:55 am, dbd <d...@ieee.org> wrote: > > > > > On Jun 11, 9:21 pm, Greg Heath <he...@alumni.brown.edu> wrote: > > > > This is a followup to the thread "Why is fft(x,M) useful? > > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > > msg/2bacfcce9454065e > > > > As long as the N components of the time sampled row > > > vector function x are presented in chronological order, > > > the use of fft(x,M) as shorthand for the zeropadding > > > operation fft([x,zeros(1,M-N)]) is relatively > > > straightforward. > > > > In contrast, it has been show in recent posts, e.g., > > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > > msg/a76d7837e3d84bcf?hl=en > > > > that when zero padding in the spectral domain, it is > > > essential to add the zeros so that both the real and > > > imaginary parts of the result are conjugate symmetric. > > > When N is even, this results in the insertion of the > > > zeros within a two part decomposition of the Nyquist > > > component. However, workarounds are available when > > > the zeros are placed on either side of the Nyquist > > > component. > > > > The purpose of this thread is to warn potential users > > > that none of the three techniques in the above reference > > > involves appending the zeros at the end of the spectrum > > > obtained from fft(x). > > > ,> Therefore, I can find no use for ifft(X,M). > > ,> > > ,> Hope this helps. > > ,> > > ,> Greg > > > I can find no use for mayonnaise, but I don't post a warning to > > comp.dsp about it. > > > Since you have included comp.dsp in this post and I've read the basis > > of your concern, why do you think those in comp.dsp need to be > > concerned about maintaining non-zero Nyquist components when > > interpolating via spectrum zero fill and ifft? Why are you? > > > How does this help? >
.> I want all of the experts and nonexperts who read .> comp.dsp to understand that .> .> 1.Using MATLABs dual input option of ifft will not .> return a reasonable interpolation of the time .> function obtained when using the single input version. Since you seem to think that the single input option of Matlab's ifft can produce an appropriate interpolation and all outputs of the single input option can be produced with the dual input option with the correct value of the second input, your statement cannot be true. If it was your intent to make a true statement, perhaps you meant to say something like "The default zero-fill behavior of the dual input option of ifft does not correctly place zeros to support zero-fill interpolation."
> 2. This has nothing to do with Nyquist components.
You referenced it as an area motivating your concern, but you're right, it probably isn't relevant to a correct version of the statement you made in 1. Then you seem to take it up again in: On Jun 12, 8:36 pm, Greg <he...@alumni.brown.edu> wrote:
> 1234567890123456789012345678901234567890123456789012345
Why? .> 3. I can't think of any scenario where the dual input .> version is of any use at all. There are others who post on comp.dsp who chose to show no imagination. Please don't encourage them. 3a. I have a vector V of length n > m. I want to know the ifft of the first m elements of V. "ifft(V,m)" requires fewer characters to type than "ifft(V(1:m))". 3b.While using ifft I want to make the code more readable for the maintenance programmer (me in 6 months). Using the dual input ifft allows my to explicitly place the size of ifft I am intending to perform in the second input to allow me to check the correctness of the size of the vector defined by the complex expression in the first input. Scenarios, great or not. .> 4. I think this is serious enough to issue a WARNING. .> .> Hope this helps. .> .> Greg You have found an application where you choose not to use ifft(X,m). This is not logically equivalent to "There is no use for ifft(X,m)." Perhaps if we tried: "The default zero-fill capability of the dual input form of ifft() may not be useful for some purposes", we could get by with just a "Warning". Dale B. Dalrymple
On 12 Jun, 21:30, Greg <he...@alumni.brown.edu> wrote:
> On Jun 12, 3:55 am, dbd <d...@ieee.org> wrote: > > > > > > > On Jun 11, 9:21 pm, Greg Heath <he...@alumni.brown.edu> wrote: > > > > This is a followup to the thread "Why is fft(x,M) useful? > > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > > msg/2bacfcce9454065e > > > > As long as the N components of the time sampled row > > > vector function x are presented in chronological order, > > > the use of fft(x,M) as shorthand for the zeropadding > > > operation fft([x,zeros(1,M-N)]) is relatively > > > straightforward. > > > > In contrast, it has been show in recent posts, e.g., > > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > > msg/a76d7837e3d84bcf?hl=en > > > > that when zero padding in the spectral domain, it is > > > essential to add the zeros so that both the real and > > > imaginary parts of the result are conjugate symmetric. > > > When N is even, this results in the insertion of the > > > zeros within a two part decomposition of the Nyquist > > > component. However, workarounds are available when > > > the zeros are placed on either side of the Nyquist > > > component. > > > > The purpose of this thread is to warn potential users > > > that none of the three techniques in the above reference > > > involves appending the zeros at the end of the spectrum > > > obtained from fft(x). > > > ,> Therefore, I can find no use for ifft(X,M). > > ,> > > ,> Hope this helps. > > ,> > > ,> Greg > > > I can find no use for mayonnaise, but I don't post a warning to > > comp.dsp about it. > > > Since you have included comp.dsp in this post and I've read the basis > > of your concern, why do you think those in comp.dsp need to be > > concerned about maintaining non-zero Nyquist components when > > interpolating via spectrum zero fill and ifft? Why are you? > > > How does this help? > > I want all of the experts and nonexperts who read > comp.dsp to understand that > > 1.Using MATLABs dual input option of ifft will not > return a reasonable interpolation of the time > function obtained when using the single input version. > 2. This has nothing to do with Nyquist components. > 3. I can't think of any scenario where the dual input > version is of any use at all. > 4. I think this is serious enough to issue a WARNING.
You're wrong on all accounts: 1) When properly used, IFFT will produce such a result 2) The key is to observe the Nyquist frequency 3) An example is given below 4) Invalidated by items 1) - 3) above. As for the example, consider the following: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% N = 20; x = sin(2*pi*0.1*reshape(0:N-1,N,1)); X = fft(x); % At this point we have the original spectrum % Next, make a copy of this spectrum and remove % the frequency components above the Nyquist % frequency: Xx = X; Xx(ceil(N/2):end)=0; % Zero-pad in frequency domain and compute % corresponding complex-valued time seruies % by using the 2nd argument to IFFT: M = 2*length(Xx); xxc = M/N*ifft(Xx,M); % Deduce the desired real-valued time serie xx = 2*real(xxc); % Plot original and interpolated time series: tvo = 0:N-1; tvip = (0:length(xx)-1)/2; clf stem(tvip,xx,'r'); hold on stem(tvo,x,'b') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I think you will find that all the resulting plot indeed shows an interpolated time series that was indeed computed by means of zero-padding in frequency domain, and implemented through IFFT(X,M). No warning needed. Rune
On Jun 13, 1:22 am, dbd <d...@ieee.org> wrote:
> On Jun 12, 12:30 pm, Greg <he...@alumni.brown.edu> wrote: > > On Jun 12, 3:55 am, dbd <d...@ieee.org> wrote: > > > > On Jun 11, 9:21 pm, Greg Heath <he...@alumni.brown.edu> wrote: > > > > > This is a followup to the thread "Why is fft(x,M) useful? > > > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > > > msg/2bacfcce9454065e > > > > > As long as the N components of the time sampled row > > > > vector function x are presented in chronological order, > > > > the use of fft(x,M) as shorthand for the zeropadding > > > > operation fft([x,zeros(1,M-N)]) is relatively > > > > straightforward. > > > > > In contrast, it has been show in recent posts, e.g., > > > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > > > msg/a76d7837e3d84bcf?hl=en > > > > > that when zero padding in the spectral domain, it is > > > > essential to add the zeros so that both the real and > > > > imaginary parts of the result are conjugate symmetric. > > > > When N is even, this results in the insertion of the > > > > zeros within a two part decomposition of the Nyquist > > > > component. However, workarounds are available when > > > > the zeros are placed on either side of the Nyquist > > > > component. > > > > > The purpose of this thread is to warn potential users > > > > that none of the three techniques in the above reference > > > > involves appending the zeros at the end of the spectrum > > > > obtained from fft(x). > > > > ,> Therefore, I can find no use for ifft(X,M). > > > ,> > > > ,> Hope this helps. > > > ,> > > > ,> Greg > > > > I can find no use for mayonnaise, but I don't post a warning to > > > comp.dsp about it. > > > > Since you have included comp.dsp in this post and I've read the basis > > > of your concern, why do you think those in comp.dsp need to be > > > concerned about maintaining non-zero Nyquist components when > > > interpolating via spectrum zero fill and ifft? Why are you? > > > > How does this help? > > .> I want all of the experts and nonexperts who read > .> comp.dsp to understand that > .> > .> 1.Using MATLABs dual input option of ifft will not > .> return a reasonable interpolation of the time > .> function obtained when using the single input version. > > Since you seem to think that the single input option of Matlab's ifft > can produce an appropriate interpolation and all outputs of the single > input option can be produced with the dual input option with the > correct value of the second input, your statement cannot be true. If > it was your intent to make a true statement, perhaps you meant to say > something like "The default zero-fill behavior of the dual input > option of ifft does not correctly place zeros to support zero-fill > interpolation."
1. When M > N is an integer multiple of N, a reasonable M point interpolation of the N point temporal function x cannot be obtained using ifft(fft(x),M). Therefore, when M > N, I cannot think of a scenario where the dual input option of ifft is useful.
> > 2. This has nothing to do with Nyquist components. > > You referenced it as an area motivating your concern, but you're > right, it probably isn't relevant to a correct version of the > statement you made in 1.
2. The cause of the failure is the incorrect placement of the zeropadding w.r.t the Nyquist frequency.
> Then you seem to take it up again in: > On Jun 12, 8:36 pm, Greg <he...@alumni.brown.edu> wrote:> 1234567890123456789012345678901234567890123456789012345 > > Why? > > .> 3. I can't think of any scenario where the dual input > .> version is of any use at all. > > There are others who post on comp.dsp who chose to show no > imagination. Please don't encourage them. > > 3a. I have a vector V of length n > m. I want to know the ifft of the > first m elements of V. "ifft(V,m)" requires fewer characters to type > than "ifft(V(1:m))". > > 3b.While using ifft I want to make the code more readable for the > maintenance programmer (me in 6 months). Using the dual input ifft > allows my to explicitly place the size of ifft I am intending to > perform in the second input to allow me to check the correctness of > the size of the vector defined by the complex expression in the first > input. > > Scenarios, great or not.
My revision of statement 1 (above) now excludes the M <= N scenarios.
> .> 4. I think this is serious enough to issue a WARNING. > .> > .> Hope this helps. > .> > .> Greg > > You have found an application where you choose not to use ifft(X,m). > This is not logically equivalent to "There is no use for ifft(X,m)." > > Perhaps if we tried: "The default zero-fill capability of the dual > input form of ifft() may not be useful for some purposes", we could > get by with just a "Warning".
Untill I find a practical counterexample, I'll stick with the above revisions. In addition, I still think that anyone attempting to use ifft(X,M), M > N for temporal interpolation should be forewarned. Hope this helps. Greg
On Jun 13, 6:28 am, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 12 Jun, 21:30, Greg <he...@alumni.brown.edu> wrote: > > On Jun 12, 3:55 am, dbd <d...@ieee.org> wrote: > > > On Jun 11, 9:21 pm, Greg Heath <he...@alumni.brown.edu> wrote: > > > > This is a followup to the thread "Why is fft(x,M) useful? > > > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > > > msg/2bacfcce9454065e > > > > > As long as the N components of the time sampled row > > > > vector function x are presented in chronological order, > > > > the use of fft(x,M) as shorthand for the zeropadding > > > > operation fft([x,zeros(1,M-N)]) is relatively > > > > straightforward. > > > > > In contrast, it has been show in recent posts, e.g., > > > > >http://groups.google.com/group/comp.soft-sys.matlab/ > > > > msg/a76d7837e3d84bcf?hl=en > > > > > that when zero padding in the spectral domain, it is > > > > essential to add the zeros so that both the real and > > > > imaginary parts of the result are conjugate symmetric. > > > > When N is even, this results in the insertion of the > > > > zeros within a two part decomposition of the Nyquist > > > > component. However, workarounds are available when > > > > the zeros are placed on either side of the Nyquist > > > > component. > > > > > The purpose of this thread is to warn potential users > > > > that none of the three techniques in the above reference > > > > involves appending the zeros at the end of the spectrum > > > > obtained from fft(x). > > > > ,> Therefore, I can find no use for ifft(X,M). > > > ,> > > > ,> Hope this helps. > > > ,> > > > ,> Greg > > > > I can find no use for mayonnaise, but I don't post a warning to > > > comp.dsp about it. > > > > Since you have included comp.dsp in this post and I've read the basis > > > of your concern, why do you think those in comp.dsp need to be > > > concerned about maintaining non-zero Nyquist components when > > > interpolating via spectrum zero fill and ifft? Why are you? > > > > How does this help? > > > I want all of the experts and nonexperts who read > > comp.dsp to understand that > > > 1.Using MATLABs dual input option of ifft will not > > return a reasonable interpolation of the time > > function obtained when using the single input version. > > 2. This has nothing to do with Nyquist components. > > 3. I can't think of any scenario where the dual input > > version is of any use at all. > > 4. I think this is serious enough to issue a WARNING. > > You're wrong on all accounts: > > 1) When properly used, IFFT will produce such a result > 2) The key is to observe the Nyquist frequency > 3) An example is given below > 4) Invalidated by items 1) - 3) above.
As a response to previous replies, the following is a revision: 1. When N = length(fft(x)) and M > N is an integer multiple of N, a reasonable M point interpolation of the arbitrary N point complex temporal function x cannot be obtained using ifft(fft(x),M). 2. The inherent cause of failure is the incorrect placement of the zeropadding w.r.t the Nyquist frequency. 3. When M > N and X = fft(x), the dual input option of ifft can be used for a reasonable temporal interpolation only under restricted conditions (e.g. x is either purely real or purely imaginary without a Nyquist component). 4. The ifft documentation should adequately explain how to use one and two input option for both the general and special cases of temporal.
> As for the example, consider the following:
-----SNIPPED EXAMPLE
> I think you will find that all the resulting plot > indeed shows an interpolated time series that was > indeed computed by means of zero-padding in frequency > domain, and implemented through IFFT(X,M).
More transparently xint = IFFT(g(fft(x)),M); for this special case.
> No warning needed.
That's debatable. See below: An enlightening but unexceptional example because 1. x is not complex 2. x does not have a Nyquist component What is needed is an adequate explanation in the ifft documentation w.r.t. temporal interpolation. Hope this helps. Greg
On 13 Jun, 19:46, Greg <he...@alumni.brown.edu> wrote:

> More transparently > > xint = IFFT(g(fft(x)),M); > > for this special case.
No. x[n] is real-valued, which means its spectrum is conjugate symmetric. Your statement above breaks that symmetry.
> > No warning needed. > > That's debatable. See below: > > An enlightening but unexceptional example because > > 1. x is not complex
What does that have to do with anything? If x[n] is complex-valued time domain interpolation becomes even simpler, as one can skip the time-domain manipulations after the IFFT.
> 2. x does not have a Nyquist component
So? If you really want to do time-domain interpolation through spectrum-domain manipulations, the handling of a non-zero Fs/2 coefficient will be debatable no matter how one chooses to compute the IFFT. Rune
On Jun 13, 3:15 pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 13 Jun, 19:46, Greg <he...@alumni.brown.edu> wrote: > > > More transparently > > > xint = IFFT(g(fft(x)),M); > > > for this special case. > > No. x[n] is real-valued, which means its spectrum > is conjugate symmetric. Your statement above breaks > that symmetry.
I don't understand what you mean. The function g just stands for whatever you did to X = fft(x) in order to obtain xint. However, I should amend that to xint = real(IFFT(g(fft(x)),M));
> > > No warning needed. > > > That's debatable. See below: > > > An enlightening but unexceptional example because > > > 1. x is not complex > > What does that have to do with anything?
You had to take the real part in order to eliminate a significantly sized imaginary part.
> If x[n] is complex-valued time domain > interpolation becomes even simpler, as one > can skip the time-domain manipulations > after the IFFT.
I disagree.
> > 2. x does not have a Nyquist component > > So? If you really want to do time-domain > interpolation through spectrum-domain > manipulations, the handling of a non-zero > Fs/2 coefficient will be debatable no matter > how one chooses to compute the IFFT.
Not really. An excellent test would be to fft a subsample of a complex temporal function and compare using the single vs double input versions of ifft for interpolating the subsample to reconstruct the original. My guess is that even experienced users of fft and ifft would have trouble. I will post a test example later. Hope this helps. Greg