Integrating numbers

Discussion in 'C++' started by Sonoman, Aug 27, 2004.

  1. Sonoman

    Sonoman Guest

    Hi all:
    Is there a class or function that I could use to integrate? By
    integrating , I mean calculus integration. I need to get data from a
    sensor that gives me the acceleration of an object. In order to find the
    displacement for this object I need to integrate its acceleration twice.
    How can I achieve this with C++? Please advise.
     
    Sonoman, Aug 27, 2004
    #1
    1. Advertising

  2. Sonoman

    osmium Guest

    Sonoman writes:

    > Is there a class or function that I could use to integrate? By
    > integrating , I mean calculus integration. I need to get data from a
    > sensor that gives me the acceleration of an object. In order to find the
    > displacement for this object I need to integrate its acceleration twice.
    > How can I achieve this with C++? Please advise.


    I would be inclined to write my own routine using something such as Simpson
    numerical integration. You can probably find something already written but
    it is probably just as fast to write it. Use 'snippets' in a Google search
    if you want to pursue the pre-written approach, that will often limit the
    results to source code.
     
    osmium, Aug 27, 2004
    #2
    1. Advertising

  3. Sonoman wrote:
    > Hi all:
    > Is there a class or function that I could use to integrate? By
    > integrating , I mean calculus integration. I need to get data from a
    > sensor that gives me the acceleration of an object. In order to find the
    > displacement for this object I need to integrate its acceleration twice.
    > How can I achieve this with C++? Please advise.


    Another issue is whether or not you are integrating over the entire
    set of data or performing the integration as the data comes in. The
    latter requires a different algorithm than the former.

    --
    Thomas Matthews

    C++ newsgroup welcome message:
    http://www.slack.net/~shiva/welcome.txt
    C++ Faq: http://www.parashift.com/c -faq-lite
    C Faq: http://www.eskimo.com/~scs/c-faq/top.html
    alt.comp.lang.learn.c-c++ faq:
    http://www.comeaucomputing.com/learn/faq/
    Other sites:
    http://www.josuttis.com -- C++ STL Library book
    http://www.sgi.com/tech/stl -- Standard Template Library
     
    Thomas Matthews, Aug 27, 2004
    #3
  4. Sonoman wrote:

    > Hi all:
    > Is there a class or function that I could use to integrate? By
    > integrating , I mean calculus integration. I need to get data from a
    > sensor that gives me the acceleration of an object. In order to find the
    > displacement for this object I need to integrate its acceleration twice.
    > How can I achieve this with C++? Please advise.


    C++ standard does not speak of this, nor does STL define one.
    Google would be your best friend here.

    --
    Karthik
     
    Karthiik Kumar, Aug 28, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Subra
    Replies:
    25
    Views:
    1,256
    user923005
    Mar 8, 2007
  2. Andrew Tatum

    Fibonacci Numbers and Lucas Numbers

    Andrew Tatum, May 26, 2007, in forum: C++
    Replies:
    6
    Views:
    608
    Howard
    May 27, 2007
  3. Lance Hoffmeyer
    Replies:
    2
    Views:
    549
    Lance Hoffmeyer
    Jul 26, 2007
  4. jko170
    Replies:
    9
    Views:
    137
    jko170
    Jan 21, 2009
  5. GIMME
    Replies:
    5
    Views:
    200
    Thomas 'PointedEars' Lahn
    Jul 26, 2004
Loading...

Share This Page