help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help-octave Digest, Vol 43, Issue 52


From: bharat pathak
Subject: Re: Help-octave Digest, Vol 43, Issue 52
Date: Mon, 26 Oct 2009 10:46:15 +0530

Dear Nuncio,
 
    This is the code I had written for design of butterworth
    filter. It also has an example to compute the order.
 
    You need to send me "Virtual Coffee" if you like the
    code.
 
Regards
Bharat Pathak
 
Arithos Designs
www.Arithos.com
 
DSP Products and Trainings.
 
//-------------------------------------------- code to design butterworth filter with given specs.
 
clear;
close all;
hold on;
 
%------------------------------------------ specification section -------------------------------------------
 
ap    = 3;   % ripple in db
as    = 50;   % stopband attenuation in db
fp    = 2000;
fs   = 2500;
Fs   = 8000;
 
%-------------- let the design begin ----------------------------------------------------------------------
 
Fn   = Fs/2;
Wp   = fp/Fn;
Ws   = fs/Fn;
 
%------------------ compute the order and get the numerator and denominator polynomial
 
[N, Wc]  = buttord(Wp, Ws, ap, as);
[b, a ]    = butter(N, Wc);
 
%-------------- plot the magnitude response in log domain with frequency as x-axis
 
[hz, f]  = freqz(b, a, 1024, Fs);
plot(f, 20*log10(abs(hz)));
 
%------------------------------------------------------------------ !! Coffee Time !! -------------------------------

From: Nuncio M
Sent: Monday, October 26, 2009 10:24 AM
Subject: Re: Help-octave Digest, Vol 43, Issue 52


Hi all,
          I am trying to use the butterworth filter.  After filtering the signal I feel there is a slight phase shift.  HOw can this be removed?.  Also how to specify the order of the filter.
eg; butter(1,fc/nysq) , does this mean a first order butterworth filter?.
Thanks and regards




--
Nuncio.M
Research Scientist
National Center for Antarctic and Ocean research
Head land Sada
Vasco da Gamma
Goa-403804


_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

reply via email to

[Prev in Thread] Current Thread [Next in Thread]