I don't know. But if you manage to do the forward FFT in scilab,
you can use the same routine to compute the ifft like this:
x = fft(conj(X));
where x is in time domain and X is in frequency domain.
You would need to scale the result properly. I'd guess
that you need to divide by N, the length of X, to get everything
right. To check, try this:
xx=1/N*fft(conj(fft(x)));
for some x of length N. When everything works out correctly,
real(xx) eqauals x.
Rune

>> How do I perform an inverse FFT in Scilab?
>
>I don't know. But if you manage to do the forward FFT in scilab,
>you can use the same routine to compute the ifft like this:
>
> x = fft(conj(X));
>
>where x is in time domain and X is in frequency domain.
>You would need to scale the result properly. I'd guess
>that you need to divide by N, the length of X, to get everything
>right. To check, try this:
>
>xx=1/N*fft(conj(fft(x)));
>
>for some x of length N. When everything works out correctly,
>real(xx) eqauals x.
>
>Rune

Hi Rune,
I'm trying to recall, isn't it:
x = conj(fft(conj(X))) ??
Richard can also try:
1. Swap real and imag parts of each X(m) freq-domain
sample to get sequence X'(m).
2. Take forward FFT of X'(m) to yield x'(n).
3. Swap real and imag parts of each x'(n) sample
to get the desired time sequence x(n).
[I learned this last scheme here on comp.dsp!]
There's a 3rd technique, but it's not nearly as
simple as the above two schemes.
See Ya,
[-Rick-]

Posted by Jerry Avins●November 13, 2003

Rick Lyons wrote:
...

> There's a 3rd technique, but it's not nearly as
> simple as the above two schemes.

Besides, it's too long to fit the ....

>
> See Ya,
> [-Rick-]

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;

> >> How do I perform an inverse FFT in Scilab?
> >
> >I don't know. But if you manage to do the forward FFT in scilab,
> >you can use the same routine to compute the ifft like this:
> >
> > x = fft(conj(X));
> >
> >where x is in time domain and X is in frequency domain.
> >You would need to scale the result properly. I'd guess
> >that you need to divide by N, the length of X, to get everything
> >right. To check, try this:
> >
> >xx=1/N*fft(conj(fft(x)));
> >
> >for some x of length N. When everything works out correctly,
> >real(xx) eqauals x.
> >
> >Rune
>
> Hi Rune,
>
> I'm trying to recall, isn't it:
>
> x = conj(fft(conj(X))) ??

It could very well be. Although Richard didn't say so, I assumed the
result of the IFFT to be a real-valued signal, in which case the outer
conj shouldn't matter... or am I too quick in dismissing that now...?
Rune

> Richard can also try:
>
> 1. Swap real and imag parts of each X(m) freq-domain
> sample to get sequence X'(m).
> 2. Take forward FFT of X'(m) to yield x'(n).
> 3. Swap real and imag parts of each x'(n) sample
> to get the desired time sequence x(n).
>
> [I learned this last scheme here on comp.dsp!]
>
> There's a 3rd technique, but it's not nearly as
> simple as the above two schemes.
>
> See Ya,
> [-Rick-]

>>>
>>>>How do I perform an inverse FFT in Scilab?
>>>
>>>I don't know. But if you manage to do the forward FFT in scilab,
>>>you can use the same routine to compute the ifft like this:
>>>
>>> x = fft(conj(X));
>>>
>>>where x is in time domain and X is in frequency domain.
>>>You would need to scale the result properly. I'd guess
>>>that you need to divide by N, the length of X, to get everything
>>>right. To check, try this:
>>>
>>>xx=1/N*fft(conj(fft(x)));
>>>
>>>for some x of length N. When everything works out correctly,
>>>real(xx) eqauals x.
>>>
>>>Rune
>>
>>Hi Rune,
>>
>> I'm trying to recall, isn't it:
>>
>>x = conj(fft(conj(X))) ??
>
>
> It could very well be. Although Richard didn't say so, I assumed the
> result of the IFFT to be a real-valued signal,

I was _assuming_ it would be real.
the sequence roughly would be
.WAV(real) --> FFT --> manipulate in freq domain --> IFFT --> real
output(?)
Caveat doctor -- I'm just learning scilab and over thirty years since
I attempted a BSEE ;)

> in which case the outer
> conj shouldn't matter... or am I too quick in dismissing that now...?
>
> Rune
>
>
>>Richard can also try:
>>
>>1. Swap real and imag parts of each X(m) freq-domain
>> sample to get sequence X'(m).
>>2. Take forward FFT of X'(m) to yield x'(n).
>>3. Swap real and imag parts of each x'(n) sample
>> to get the desired time sequence x(n).
>>
>>[I learned this last scheme here on comp.dsp!]
>>
>>There's a 3rd technique, but it's not nearly as
>>simple as the above two schemes.
>>
>>See Ya,
>>[-Rick-]

> >>>
> >>>>How do I perform an inverse FFT in Scilab?
> >>>
> >>>I don't know. But if you manage to do the forward FFT in scilab,
> >>>you can use the same routine to compute the ifft like this:
> >>>
> >>> x = fft(conj(X));
> >>>
> >>>where x is in time domain and X is in frequency domain.
> >>>You would need to scale the result properly. I'd guess
> >>>that you need to divide by N, the length of X, to get everything
> >>>right. To check, try this:
> >>>
> >>>xx=1/N*fft(conj(fft(x)));
> >>>
> >>>for some x of length N. When everything works out correctly,
> >>>real(xx) eqauals x.
> >>>
> >>>Rune
> >>
> >>Hi Rune,
> >>
> >> I'm trying to recall, isn't it:
> >>
> >>x = conj(fft(conj(X))) ??
> >
> >
> > It could very well be. Although Richard didn't say so, I assumed the
> > result of the IFFT to be a real-valued signal,
>
> I was _assuming_ it would be real.
> the sequence roughly would be
> .WAV(real) --> FFT --> manipulate in freq domain --> IFFT --> real
> output(?)

In that case the output will be real-valued but represented by complex-
valued numerics, i.e. the imaginary parts of the numbers are of vanishing
magnitudes. This assumes that you are careful about the symmetry
properties of real-valued signals in f domain: X(-f) = conj(X(f)).
Now, you could half the work and take away some book-keeping drudgery
by manipulating only the "useful" half-band ( f = [0,fs/2>, fs is
sampling frequency ). Set the remaining half-band ( f= [fs/2, fs> ) to
zero and compute the complex IDFT to find z(n) (complex-valued) in time
domain. Then, reconstruct the real-valued time domain signal x(n) as
x(n)=2*real(z(n)).
Rune

>>>>>
>>>>>
>>>>>>How do I perform an inverse FFT in Scilab?
>>>>>
>>>>>I don't know. But if you manage to do the forward FFT in scilab,
>>>>>you can use the same routine to compute the ifft like this:
>>>>>
>>>>>x = fft(conj(X));
>>>>>
>>>>>where x is in time domain and X is in frequency domain.
>>>>>You would need to scale the result properly. I'd guess
>>>>>that you need to divide by N, the length of X, to get everything
>>>>>right. To check, try this:
>>>>>
>>>>>xx=1/N*fft(conj(fft(x)));
>>>>>
>>>>>for some x of length N. When everything works out correctly,
>>>>>real(xx) eqauals x.
>>>>>
>>>>>Rune
>>>>
>>>>Hi Rune,
>>>>
>>>> I'm trying to recall, isn't it:
>>>>
>>>>x = conj(fft(conj(X))) ??
>>>
>>>
>>>It could very well be. Although Richard didn't say so, I assumed the
>>>result of the IFFT to be a real-valued signal,
>>
>>I was _assuming_ it would be real.
>>the sequence roughly would be
>>.WAV(real) --> FFT --> manipulate in freq domain --> IFFT --> real
>>output(?)
>
>
> In that case the output will be real-valued but represented by complex-
> valued numerics, i.e. the imaginary parts of the numbers are of vanishing
> magnitudes. This assumes that you are careful about the symmetry
> properties of real-valued signals in f domain: X(-f) = conj(X(f)).
>
> Now, you could half the work and take away some book-keeping drudgery
> by manipulating only the "useful" half-band ( f = [0,fs/2>, fs is
> sampling frequency ). Set the remaining half-band ( f= [fs/2, fs> ) to
> zero and compute the complex IDFT to find z(n) (complex-valued) in time
> domain. Then, reconstruct the real-valued time domain signal x(n) as
>
> x(n)=2*real(z(n)).
>
> Rune

I don't know if Scilab hides something from me, but both Rune's and
Rick's approach give the same answer in a test case (using ding.wav as
input).
Also, using Scilab syntax
f = fft(x,1) // do forward transform of x
Someone said I could do
x2 = fft(f,-1) // Scilab docs say this does *NOT* do an IFFT but just
changes sign of an exponent
It however gives the same result as Rune or Rick scaled by number of
samples.