Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 7 of 7

Thread: Integral solution using Simpson's Rule

  1. #1
    Join Date
    3rd June 2005
    Posts
    24

    Integral solution using Simpson's Rule

    Integral solution using Simpson's Rule(numerical integration) in VBA. Using any integral formula, does anybody out there knows how to use VBA to get integral solution using simpson's rule?
    Last edited by Isabella; June 9th, 2005 at 17:02. Reason: change title

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    26th January 2003
    Location
    Derbyshire,UK
    Posts
    17,467

    Re: huh?

    Please use a helpful title when posting questions. This thread's title is totally useless!!!! It cannot be used in Searches & will probably not attract too much attention.
    Hope that Helps

    Roy

    For free Excel tools & articles visit my web site

    If I have helped you and you feel like putting your hand in your pocket please make a donation to Children in Need

    RoyUK's Web Site

    royUK's Database Form

    About me.

  3. #3
    Join Date
    3rd June 2005
    Posts
    24

    Re: Integral solution using Simpson's Rule

    is that ok?

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    26th January 2003
    Location
    Derbyshire,UK
    Posts
    17,467

    Re: Integral solution using Simpson's Rule

    I think you might find you get more help now. Thanks
    Hope that Helps

    Roy

    For free Excel tools & articles visit my web site

    If I have helped you and you feel like putting your hand in your pocket please make a donation to Children in Need

    RoyUK's Web Site

    royUK's Database Form

    About me.

  5. #5
    Join Date
    2nd December 2004
    Location
    Frankfurt, D
    Posts
    383

    Re: Integral solution using Simpson's Rule

    you can find all you want in Numerical Recipes

    look at the loowing link:

    http://www.library.cornell.edu/nr/bookcpdf/c4-2.pdf

    filo65

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    3rd June 2005
    Posts
    24

    Re: Integral solution using Simpson's Rule

    Thanks

    Excel Video Tutorials / Excel Dashboards Reports


  7. #7
    Join Date
    5th May 2005
    Location
    Hershey, PA
    Posts
    21

    Re: Integral solution using Simpson's Rule

    It's not as stringent as simpson's rule, but here's a numerical integration UDF I wrote using the trapezoid rule. Perhaps it will be good enough for your situation.

    VB:
    Function AUC(xRng As Range, yRng As Range) As Double 
         ' Approximation of the definite integral using the Trapezoid rule
        Dim xRows As Integer, yRows As Integer 
        Dim xRow As Integer, yRow As Integer 
        Dim LeftRule As Double, RightRule As Double, TrapRule As Double, MidRule As Double 
        xRows = xRng.Rows.Count 
        yRows = yRng.Rows.Count 
        RightRule = 0 
        LeftRule = 0 
        TrapRule = 0 
         
        For i = 2 To xRows 
            RightRule = RightRule + yRng.Cells(i, 1) * (xRng.Cells(i, 1) - xRng.Cells(i - 1, 1)) 
            LeftRule = LeftRule + yRng.Cells(i - 1, 1) * (xRng.Cells(i, 1) - xRng.Cells(i - 1, 1)) 
            TrapRule = (LeftRule + RightRule) / 2 
        Next i 
        AUC = TrapRule 
    End Function 
    
    
    Attached Files. REMINDER! OzGrid accepts no responsibility for ANY adverse effects as a result from downloading attached files. ALWAYS run an up-to-date virus scan and disable macros.

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Validation Rule
    By aliosman in forum EXCEL HELP
    Replies: 1
    Last Post: April 11th, 2007, 20:38
  2. Applying rule on a table
    By blin in forum EXCEL HELP
    Replies: 1
    Last Post: December 3rd, 2005, 12:02
  3. Integral of the Weibull function
    By rassis in forum EXCEL HELP
    Replies: 1
    Last Post: December 27th, 2004, 18:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno