# cheby1

Create a Chebyshev I filter.

## Syntax

[b,a] = cheby1(n,Rp,Wp)

[b,a] = cheby1(n,Rp,Wp,band)

[b,a] = cheby1(n,Rp,Wp,domain)

[b,a] = cheby1(n,Rp,Wp,band,domain)

## Inputs

`n`- The filter order.
`Rp`- The maximum attenuation in decibels in the passband, specified by
`Wp`. `Wp`- A scalar specifying the cutoff frequency of a low or high pass filter, or a two element vector specifying the cutoff frequencies of a bandpass or bandstop filter. For a digital filter the values (in Hz) are normalized relative to the Nyquist frequency. For an analog filter the values are in radians/sec.
`band`- The band type of the filter. Omit for low pass or bandpass. Use
`'high'`for high pass, and`'stop'`for bandstop. `domain`-
- Use 'z' for digital filters (default).
- Use 's' for analog filters.

## Outputs

- b
- The numerator polynomial coefficients of the filter.
- a
- The denominator polynomial coefficients of the filter.

## Example

Create a fourth order Chebyshev I low pass digital filter with a 300 Hz cutoff frequency and a 1000 Hz sampling frequency, and with 1dB attenuation in the pass band.

`[b,a] = cheby1(4,1,300/500)`

```
b = [Matrix] 1 x 5
0.11032 0.44129 0.66193 0.44129 0.11032
a = [Matrix] 1 x 5
1.00000 0.15099 0.80417 -0.16181 0.18717
```

## Comments

Filters can become unstable for high orders, and more easily so for bandpass or stopband filters.