You are here : matlabSignal Processingfirpmord

# firpmord() - Signal Processing

```[n,fo,ao,w] = firpmord(f,a,dev) finds
the approximate order, normalized frequency band edges, frequency
band amplitudes, and weights that meet input specifications f, a,
and dev.f is a vector of frequency band
edges (between 0 and Fs/2,
where Fs is the sampling
frequency), and a is a vector specifying the desired
amplitude on the bands defined by f. The length
of f is two less than twice the length of a.
The desired function is piecewise constant.dev is a vector the same size as a that
specifies the maximum allowable deviation or ripples between the frequency
response and the desired amplitude of the output filter for each band.Use firpm with the resulting
order n, frequency vector fo,
amplitude response vector ao, and weights w to
design the filter b which approximately meets the
specifications given by firpmord input parameters f, a,
and dev.b = firpm(n,fo,ao,w)
[n,fo,ao,w] = firpmord(f,a,dev,fs)
specifies a sampling frequency fs.  fs defaults
to 2 Hz, implying a Nyquist frequency of 1 Hz.
You can therefore specify band edges scaled to a particular application's
sampling frequency.c = firpmord(f,a,dev,fs,'cell') generates a cell-array whose elements are the parameters
to firpm.Note

In some cases, firpmord underestimates or
overestimates the order n. If the filter does not
meet the specifications, try a higher order such as n+1 or n+2.```

### Syntax

`[n,fo,ao,w] = firpmord(f,a,dev)[n,fo,ao,w] = firpmord(f,a,dev,fs)c = firpmord(f,a,dev,fs,'cell')`

### Example

`b = firpm(n,fo,ao,w)`