[SciPy-user] butterworth filter

Jerry lanceboyle@qwest....
Tue Sep 16 00:00:40 CDT 2008


Just an innocent bystander here, but that plot looks wrong. Could you  
please re-submit it with decibels on the vertical axis against log  
frequency? That is the normal way of viewing filter frequency responses.
Jerry

On Sep 12, 2008, at 2:18 PM, Ryan Krauss wrote:

> So, attached is the plot I get from scipy.  It is a high pass  
> filter.  It seems reasonable.  What does the curve look like from  
> Matlab.
>
> Ryan
>
> On Tue, Sep 9, 2008 at 8:37 AM, cyril giraudon  
> <cyril.giraudon@free.fr> wrote:
> Hi,
>
> I use scipy 0.6.0 and i try to reproduce the plot of the matlab butter
> function web documentation (first response for a google request  
> "matlab
> butter example").
>
> The matlab code is :
>
> [z,p,k] = butter(9,300/500,'high');
> [sos,g] = zp2sos(z,p,k);             % Convert to SOS form
> Hd = dfilt.df2tsos(sos,g);   % Create a dfilt object
> h = fvtool(Hd);              % Plot magnitude response
> set(h,'Analysis','freq')             % Display frequency response
>
>
> In scipy, I write :
>
> from scipy.signal import butter, freqz
>
> from pylab import show, grid, log, plot
>
> b, a = butter(9, 300./500., 'high')
>
> fi = freqz(b, a)
>
> plot(fi[0], 20*log(abs(fi[1])))
>
> grid()
>
> show()
>
>
>
> Why are the two filters not the same ?
>
>
> Thanks a lot,
>
> Cyril.
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
> <butter_scipy.png>_______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20080915/6dc8ff43/attachment.html 


More information about the SciPy-user mailing list