nextpow2
Exponent of next higher power of 2
📝Syntaxe
R = nextpow2(M)
📥Arguments d'entrée
Paramètre Description
M a variable
📤Arguments de sortie
Paramètre Description
R result of nextpow2: next higher power of 2.
📄Description

if M is a vector or a matrix nextpow2(M) applies element-wise.

If M is a scalar, nextpow2(M) returns the first p such that 2^p >= abs(M).

💡Exemples
R = nextpow2([10, Inf, 30, -Inf, 90, NaN])
M = uint32([1020 4000 32700]);
R = nextpow2(M)
🔗Voir aussi
pow2log2
🕔Historique des versions
Version Description
1.0.0 version initiale
Modifier cette page sur GitHub