## Documentation Center |

Number of integer bits needed for fixed-point inner product

`innerprodintbits(a,b)`

`innerprodintbits(a,b)` computes the minimum
number of integer bits necessary in the inner product of `a'*b` to
guarantee that no overflows occur and to preserve best precision.

`a`and`b`are`fi`vectors.The values of

`a`are known.Only the numeric type of

`b`is relevant. The values of`b`are ignored.

The primary use of this function is to determine the number
of integer bits necessary in the output `Y` of an
FIR filter that computes the inner product between constant coefficient
row vector `B` and state column vector `Z`.
For example,

for k=1:length(X); Z = [X(k);Z(1:end-1)]; Y(k) = B * Z; end

Was this topic helpful?