For apply least-squares linear-phase FIR filter design,with frequency domain specification is not symmetrical.

The pass-band error function,

$$E(\mathbf{h})_p=\int_{\omega_{p_1}}^{\omega_{p_2}}| \mathbf{c}^T(\omega)\cdot \mathbf{h}-D(\omega)|^2d\omega \tag{1}$$

The stop-band error function,

$$E(\mathbf{h})_s=\int_{\omega_{s_1}}^{\omega_{s_2}}|\mathbf{c}^T(\omega)\cdot \mathbf{h}|^2d\omega\tag{2}$$

h: unknown complex coefficients.

Total error function,


$w_1,w_2$: weighting constants .

  • The equation $(1)$ : which represents a filter approximation by determine the error between actual and desired response in pass-band , why the method is different in stop-band (equation $(2)$) ?

-In matlab ,does it the freqz function achieve the transpose operation ?


1 Answer 1


In the stopband(s), Eqs $(1)$ and $(2)$ are equivalent, because in the stopband the desired response equals zero: $D(\omega)=0$. The reason why you might want to split the error in passband and stopband error is to apply different weights, as shown in your Eq. $(3)$.

The function freqz computes the frequency response of a discrete-time filter on a grid of frequencies, given the filter coefficients. I'm not sure what you mean by "achieve the transpose operation".

  • $\begingroup$ Matt L:Why there is no Hermitian operation ,why there is just transpose ?why using it? $\endgroup$
    – K.n90
    Commented Sep 14, 2018 at 10:33
  • $\begingroup$ @K.n90: It's up to you, depending on how you define the vector $\mathbf{c}(\omega)$. Add your definition of $\mathbf{c}(\omega)$, and it will become clear if you need to use $^H$ or $^T$ (or none of the two). $\endgroup$
    – Matt L.
    Commented Sep 14, 2018 at 10:38
  • $\begingroup$ :The definition in this answer [] (dsp.stackexchange.com/a/50937/32272), is what I need but without using Hermitian operation. In other hand, does the choice of the coefficients type (h) have an effect on using the operations ( Hermitian ,transpose)? $\endgroup$
    – K.n90
    Commented Sep 14, 2018 at 11:16
  • $\begingroup$ @K.n90: If you want to use the definition used in the answer you mentioned, you have to use $^H$ (as shown there), otherwise use your own definition. I don't understand the problem. $\endgroup$
    – Matt L.
    Commented Sep 14, 2018 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.