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):

Subject:
question about buttord function in R signal module
From:
Michael Tiemann <[EMAIL PROTECTED]>
Date:
Thu, 06 Nov 2008 07:18:58 -0500

To:
[EMAIL PROTECTED]


Tom,

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
   filters")
           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
   defined...why?
       if (any(stop))
           type = ""

Thank you for any explanation you can provide.

M

______________________________________________
R-help@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.

Reply via email to