<< ellipap | FOSSEE_Signal_Processing_Toolbox | enbw >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > ellipord

# ellipord

Compute the minimum filter order of a digital elliptic or Cauer filter with the desired response characteristics.

### Syntax

    [n] = ellipord(Wp, Ws, Rp, Rs)
    [n, Wp] = ellipord(Wp, Ws, Rp, Rs)

### Parameters

Wp:

  Scalar or vector of length 2. Specifies the passband edge(s). All elements must be in the range [0, 1].

Ws:

  Scalar or vector of length 2. Specifies the stopband edge(s). All elements must be in the range [0, 1].

Rp:

  Non-negative scalar. The passband ripple in decibels (dB).

Rs:

  Non-negative scalar. The stopband attenuation in decibels (dB).

n:

  Positive integer. The minimum order of the filter satisfying the given specifications.

### Description

This function computes the minimum filter order of an elliptic filter with the desired response characteristics. - Stopband frequency `Ws` and passband frequency `Wp` specify the filter frequency band edges. - Frequencies are normalized to the Nyquist frequency in the range [0, 1]. - `Rp` is measured in decibels and represents the allowable passband ripple. - `Rs` is measured in decibels and represents the minimum attenuation in the stopband. - If `Ws > Wp`, the filter is a lowpass filter. If `Wp > Ws`, the filter is a highpass filter. - If `Wp` and `Ws` are vectors of length 2, the passband interval is defined by `Wp` and the stopband interval is defined by `Ws`. - If `Wp` is contained within the lower and upper limits of `Ws`, the filter is a bandpass filter. - If `Ws` is contained within the lower and upper limits of `Wp`, the filter is a bandstop or band-reject filter.

### Examples

    // Bandpass filter:
    Wp = [60 200]/500
    Ws = [50 250]/500
    Rp = 3
    Rs = 40
    [n, Wp] = ellipord(Wp, Ws, Rp, Rs)

Report an issue
<< ellipap | FOSSEE_Signal_Processing_Toolbox | enbw >>