# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# iirshiftc

Shift frequency response of IIR complex filter

## Syntax

```[Num,Den,AllpassNum,AllpassDen] = iirshiftc(B,A,Wo,Wc) [Num,Den,AllpassNum,AllpassDen] = iirshiftc(B,A,0,0.5) [Num,Den,AllpassNum,AllpassDen] = iirshiftc(B,A,0,-0.5) ```

## Description

```[Num,Den,AllpassNum,AllpassDen] = iirshiftc(B,A,Wo,Wc)``` returns the numerator and denominator vectors, `Num` and `Den` respectively, of the target filter transformed from the real lowpass prototype by applying a first-order complex frequency shift transformation. This transformation rotates all the features of an original filter by the same amount specified by the location of the selected feature of the prototype filter, originally at Wo, placed at Wt in the target filter.

It also returns the numerator, `AllpassNum`, and the denominator, `AllpassDen`, of the allpass mapping filter. The prototype lowpass filter is given with the numerator specified by `B` and the denominator specified by `A`.

```[Num,Den,AllpassNum,AllpassDen] = iirshiftc(B,A,0,0.5)``` calculates the allpass filter for doing the Hilbert transformation, i.e. a 90 degree counterclockwise rotation of an original filter in the frequency domain.

```[Num,Den,AllpassNum,AllpassDen] = iirshiftc(B,A,0,-0.5)``` calculates the allpass filter for doing an inverse Hilbert transformation, i.e. a 90 degree clockwise rotation of an original filter in the frequency domain.

## Examples

Design a prototype real IIR halfband filter using a standard elliptic approach:

`[b, a] = ellip(3, 0.1, 30, 0.409);`

Rotate all features of the prototype filter in the frequency domain by the same amount by specifying where the selected feature of an original filter, `W`o```= 0.5```, should appear in the target filter, `W`t```= 0.25```:

`[num, den] = iirshiftc(b, a, 0.5, 0.25);`

Verify the result by comparing the prototype filter with the target filter:

`fvtool(b, a, num, den);`

After applying the shift, the selected feature from the original filter is just where it should be, at `W`t ```= 0.25```.

## Arguments

VariableDescription
`B`

Numerator of the prototype lowpass filter

`A`

Denominator of the prototype lowpass filter

`Wo`

Frequency value to be transformed from the prototype filter

`Wt`

Desired frequency location in the transformed target filter

`Num`

Numerator of the target filter

`Den`

Denominator of the target filter

`AllpassNum`

Numerator of the mapping filter

`AllpassDen`

Denominator of the mapping filter

Frequencies must be normalized to be between -1 and 1, with 1 corresponding to half the sample rate.

## References

Oppenheim, A.V., R.W. Schafer and J.R. Buck, Discrete-Time Signal Processing, Prentice-Hall International Inc., 1989.

Dutta-Roy, S.C. and B. Kumar, “On digital differentiators, Hilbert transformers, and half-band low-pass filters,” IEEE® Transactions on Education, vol. 32, pp. 314-318, August 1989.