nextpow2
Computes the exponent of the smallest power of 2 that is greater than or equal to the input in magnitude.
Syntax
N = nextpow2(x)
Inputs
- x
- Type: double | integer
Outputs
- N
- The exponent for the power of 2.
Example
N = nextpow2(63)
N = 6