[R] need help with SIGNAL module

From: Michael Tiemann <michaeltiemann_at_mac.com>
Date: Thu, 06 Nov 2008 11:21:31 -0500

I sent this message to the maintainer's email address listed on the signal package, but it bounced. Perhaps somebody on this list has more insight into the signal package than I do (or knows the maintainer's new address):

question about buttord function in R signal module From:
Michael Tiemann <michaeltiemann_at_mac.com> Date:
Thu, 06 Nov 2008 07:18:58 -0500



I was trying to compare lowpass and highpass filters and found that the buttord example in the manual worked as expected, namely the $type was "low". But when I reversed the Wp and Ws parameters, it resulted in an object with an empty $type instead of $type being "high". I looked at the source code and found an obvious reason why:

        if (length(Wp) == 2) {
            warning("buttord seems to overdesign bandpass and bandreject
            if (any(stop))
                type = "stop"
            else type = "pass"
        else {

## here we set to "high" or "low", as expected
if (any(stop)) type = "high" else type = "low" }

## here we arbitrarily override the type if there is a stop band
        if (any(stop))
            type = ""

Thank you for any explanation you can provide.


R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 06 Nov 2008 - 17:19:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 06 Nov 2008 - 17:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive