;; This example introduces ``weights.'' In example 1, the ripple in
;; the passband and in the stopband were the same. We now trade a
;; smaller passband ripple for a larger stopband ripple.
;; parameters as in example-1.scm
(title "A simple filter II")
(verbose #t)
(cosine-symmetry)
(filter-length 10)
(sampling-frequency 60)
;; Like in example-1, we specify the frequency reponse. The passband
;; is from 0 to 10 Hz, and H(f) should be 1 in this band. Now the
;; constraint has weight 0.2, however. The weight is a measure of how
;; much H(f) can deviate from the constraint. Since the stopband
;; constraint has a default weight 1, the passband ripple will be one
;; fifth of the stopband ripple.
(limit-= (band 0 10) 1 .2) ; .2 is the weight
(limit-= (band 20 30) 0) ; no weight specified ==> weight = 1
(output-file "example-2.coef")
(plot-file "example-2.plot")
(go)

This page maintained by: Matteo Frigo. Last updated: Sun Jan 6 06:31:03 2013
.