How do I design a filter with remez?
A Remez (or Parks-McClellan equiripple) filter is specified by the order of the filter and the location of its pass- and stopbands. As in the question above, the bands are specified in terms of the Nyquist frequency, not the sampling frequency. The bands specified must be linear, and are not restricted to having a zero slope. To specify the bands two variables, frequency and magnitude, are given. Frequency represents a vector of frequencies specifying the start and end points for each band. Magnitude specifies the corresponding magnitude at the edges of the bands. For example, a bandpass filter, which would have three bands (two stop and one pass), would look like this: frequency=[0 w_stop1rightedge w_passleftedge… w_passrightedge w_stop2leftedge 1]; magnitude=[0 0 1 1 0 0]; Note that frequency always starts with 0 (DC) and ends with 1 (Nyquist frequency). The command plot(frequency,magnitude) will give a rough plot of the desired frequency response.