import **signals.filters.iir-1**

Design Butterworth IIR filter with Matlab-like syntax.

import signals.filters.iir-1;

Butterworth digital filter design

```
filt=butter(
```*4*,*0.3*[*0.3,0.7*],"")

n | The order of the filter. |

Wn | The relative corner frequency. |

return value | Transfer function object. |

The function can be used in several ways:

- butter(n,Wn) - Design an n pole lowpass or bandpass Butterworth filter with corner frequency Wn (scalar or 2 element vector).
- buffer(n,Wn,type) - Design an n pole lowpass, highpass, bandpass, or bandstop filter, with corner frequencies specified by Wn (scalar or 2 element vector).
- butter(...,'s') - If 's' is added to the end of the function, an analog filter will be designed.

- lowpass, highpass - A scalar value representing the corner frequency of the filter.
- bandpass, bandstop - A 2-element vector representing the corner frequencies: [Wn1 Wn2]. Wn1 < Wn2.

The parameter *type* is a string value describing the filter type:

*"low"*: lowpass (you can omit*type*)*"high"*: highpass*"bandpass"*: bandpass (you can omit*type*)*"stop"*: bandstop

import signals.filters.iir-1;

Butterworth digital filter design

```
filt=butter(
```*4*,*0.3*[*0.3,0.7*],"")

import signals.filters.iir-1;

Butterworth analog filter design

```
filt=butter(
```*4*,*0.3*[*0.3,0.7*],"","s")

import signals.filters.iir-1;

Plot filter characteristics

```
filt.plot()
```