# getLatency

Latency of FIR filter

## Syntax

## Description

returns the latency, `Y`

= getLatency(`hdlfir`

)`Y`

, between the first valid input sample
and the first valid output sample, assuming contiguous input samples. Use this
syntax when the `CoefficientsDataType`

is set to a numeric type,
you are not using programmable coefficients, and the input data is not complex or a
vector.

returns the latency, `Y`

= getLatency(`hdlfir`

,`inputType`

,[],`isInputComplex`

,`V`

)`Y`

. The latency depends on filter
structure, filter coefficients, and input vector size. Use this syntax when you are
not using programmable coefficients. These arguments may be optional, depending on
the object configuration.

Use

`inputType`

when you set`CoefficientsDataType`

property to`'Same word length as input'`

. The latency can change with input data type because the object casts the coefficients to the input data type, which can affect multiplier sharing for equal-absolute-value coefficients.Use

`isInputComplex`

when your input data is complex and you are using a partly-serial systolic architecture. The latency changes when you have complex data and complex coefficients because of the extra adder pipeline. When you specify`isInputComplex`

, you must also give a placeholder argument,`[]`

for the unused third argument.Use

`V`

to specify the input vector size when your input is not scalar.

returns the latency, `Y`

= getLatency(`hdlfir`

,`coeffType`

,`coeffPrototype`

,`isInputComplex`

,`V`

)`Y`

. Use this syntax when you are using
programmable coefficients. `coeffType`

is the data type of the
input coefficients. The final two arguments may be optional, depending on the object
configuration.

Use

`coeffPrototype`

to optimize the programmable filter for symmetric or antisymmetric coefficients. The prototype specifies a pattern that all input coefficients must follow. Based on the prototype, the object implements an optimized filter that shares the multipliers for symmetric coefficients. If you are not using the memory coefficient interface, and your input coefficients do not all conform to the same pattern or to opt out of multiplier optimization, you can omit this argument or specify the prototype as an empty vector,`[]`

. The`coeffPrototype`

is required if you use the memory coefficient interface.Use

`isInputComplex`

when your input data is complex. When you specify`isInputComplex`

, you must also specify the`coeffPrototype`

or a placeholder argument,`[]`

.Use

`V`

to specify the input vector size when your input is not scalar.

## Examples

## Input Arguments

## Output Arguments

## Version History

**Introduced in R2017a**