Dear all,

Consider

M = 16
w = [ones(1,M/4),zeros(1,M/4)]
w = [w(1:M/2), 0, conj(w($:-1:2))]
v = ifft(w)
isreal(v)

The first 3 lines defines a real spectrum of a real signal, then the
real signal is recovered and finally it is checked whether it is real or
not.

What puzzles me is that the result is T (true). However, the definition
of the ifft() involves complex operations, so at some point the numbers
must be converted to a complex representation such as

1. + 0.i

so I would expect that the result included 0i so the result of the test
should be F. Where is this null imaginary component removed?

I don't say this is wrong, but it is perplexing if compared to much more
simple operations such as

sqrt(%i^4)

which yields 1. + 0.i, a complex representation of real scalar 1.

Maybe the fftw package is so refined to detect whether the result is
actually real and removes the useless 0.i components?

Regards,

Federico Miyara




--
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to