pow2
Efficient fixed-point multiplication by 2K
Syntax
Description
returns the value of b = pow2(a,K)a shifted by K bits, where
K is an integer and a and b
are fi objects. The output
b always has the same word length and fraction length as the input
a.
Note
In fixed-point arithmetic, shifting by K bits is equivalent to,
and more efficient than, computing b =
a*2K.
For floating-point numbers, use the pow2 function.
Examples
Input Arguments
Limitations
The syntax
b = pow2(a)is not supported whenais afiobject.
Tips
Extended Capabilities
Version History
Introduced before R2006a