Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Coding Matlab function "filter" in C++
Replies: 6   Last Post: Feb 11, 2013 11:03 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Chris Heier

Posts: 3
Registered: 11/29/05
Coding Matlab function "filter" in C++
Posted: Nov 29, 2005 5:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I'm working on a fairly simple Matlab script but am having troubles
trying to figure out what is really happening behind the scenes. I'm
working with an API for in house software to play with seismic data. I
was given a template from one of the developers to work with to develop
our own filter.

The main command that has me stumped pretty much is "y = filter(b, a,
x)" where X is a full trace of a variable length (depending on the
value contained in NSamples in C++).

a = [1 k1*(1+k2) k2]
and
b = [k2 k1*(1 + k2) 1]

What is happening in the filter command eludes me and I'm having
troubles trying to figure out how to work with it in C++ without having
to try and include a Matlab library in the template. The documetnation
on "filter" is somewhat helpful, but I'm having troubles trying to get
my head around it, so I guess what I'm looking for is mainly an
explanation as to what "filter" is doing with the information given.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.