[SciPy-User] frequency components of a signal buried in a noisy time domain signal

josef.pktd@gmai... josef.pktd@gmai...
Sat Feb 27 15:38:06 CST 2010


On Sat, Feb 27, 2010 at 4:14 PM, Ivo Maljevic <ivo.maljevic@gmail.com> wrote:
> -1
>
> Which brings up the question: is nextpow2(.5) 0 or -1?
>

frexp has a discontinuity at zero, same as matlab
(or is this a computer science definition)

matlab:
>> nextpow2(0.5)
ans =
    -1
>> nextpow2(0.25)
ans =
    -2
>>
>> nextpow2(0.125)
ans =
    -3
>> nextpow2(1e-300)
ans =
  -996
>> nextpow2(0)
ans =
     0

Josef

> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>


More information about the SciPy-User mailing list