Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2008

Tip: Looking for answers? Try searching our database.

Excel 2007 - How to do a Chebychev filter w/ VBA?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gak27 - 09 Jan 2008 15:31 GMT
Greetings all!

The subject says it all - we're doing some data analyis and would like to be
able to do some filtering, including the aforementioned Chebychev.  Any ideas?

Greg
Mike Middleton - 09 Jan 2008 21:15 GMT
Greg or gak27  -

An idea: Describe the particular algorithm you want to use, or provide a web
link to a page that describes the technique, or post the VBA code you have
so far with specific questions about problems you are having.

-  Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel

> Greetings all!
>
[quoted text clipped - 4 lines]
>
> Greg
Harlan Grove - 11 Jan 2008 01:48 GMT
"Mike Middleton" <m...@mikemiddleton.com> wrote...
>An idea: Describe the particular algorithm you want to use, . . .

Another idea: if you don't know signal processing, don't respond to
questions on signal processing.
Harlan Grove - 11 Jan 2008 01:46 GMT
gak27 <ga...@discussions.microsoft.com> wrote...
>The subject says it all - we're doing some data analyis and would like
>to be able to do some filtering, including the aforementioned
>Chebychev.  Any ideas?

Presumably you mean a type I Chebyshev filter with general formula

G(n, w) = 1/SQRT(1+(eps*T(n,w/w0))^2)

where T(n,.) is the Chebyshev polynomial of the first kind of order n
and eps is the ripple factor and w0 is the cutoff frequency.

T(0,x)   = 1
T(1,x)   = x
T(n+1,x) = 2x T(n,x) - T(n-1,x)

While you could use VBA for the T(.,.), if you needed only a modest
number of orders, you could use a range of simple formulas to generate
the polynomial coefficients, e.g., in A1:K12,

A1:    =COLUMNS($A1:A1)-1

Fill A1 right into B1:K1.

A1:    1
B1:K1:    0

A2:    0
B2:    1
C2:K2:    0

A3:    =-A1
B3:    =2*A2-B1

Fill B3 right into C3:K3, then select A3:K3 and fill down into A4:K11.
Name A1:K12 ChCo. The value of T(n,x) for x > 0 is given by the
formula

=SUMPRODUCT(INDEX(ChCo,n+2,0),x^INDEX(ChCo,1,0))

So the Chebyshev filter value would be given by

=1/SQRT(1+(eps*SUMPRODUCT(INDEX(ChCo,n+2,0),(w/w0)^INDEX(ChCo,1,0)))^2)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.