p = nextpow2(n)
p = nextpow2(x)
p = nextpow2(n) returns the first p such that 2^p >= abs(n). It is often useful for finding the nearest power of two sequence length for FFT operations.
p = nextpow2(x), where x is a vector, is nextpow2(length(x)).
n in the range from 513 to 1024, nextpow2(n) is 10.
fft,log2,pow2
(c) Copyright 1994 by The MathWorks, Inc.