+ Reply to Thread
Results 1 to 9 of 9

integration function

  1. #1
    Registered User
    Join Date
    07-18-2009
    Location
    paris
    MS-Off Ver
    Excel 2003
    Posts
    25

    integration function

    Hi everybody. I have to make one things that in theory is very simple. yo integrate a function.
    So my imput is an array in a row
    and i have to write a function with two variables one the function and other the time so i can create an array of this integral for different time
    here the code that i wrote but it doesn't work
    Please Login or Register  to view this content.

    thank you
    Alice

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: integration function

    Pretty hard to tell what your function is supposed to be doing.

    1. Exp is a native VBA function; the worksheet function EXP is not available (or needed) in VBA.

    2. How do you know the upper and lower bounds of fwd?

    3. Where's the rest of the code in which this is applied?

    4. A workbook example, would, as always, help.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    07-18-2009
    Location
    paris
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: integration function

    so to use exp i just write exp(....) i the code??
    here the function to integrate
    Attached Files Attached Files

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: integration function

    I still don't understand what you're doing, and you didn't answer the other questions. Why are you exponentiating at all?

    If you just want to integrate the function,

    =SUMPRODUCT( (C4:AZ4 + B4:AY4) * (C3:AZ3 - B3:AY3) ) / 2

  5. #5
    Registered User
    Join Date
    07-18-2009
    Location
    paris
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: integration function

    yes sorry here my answer.
    at first i use exp because after integration i need the exp of integration.


    2. How do you know the upper and lower bounds of fwd?
    I select in the rng with the mouse

    3. Where's the rest of the code in which this is applied?
    is applied to a montecarlo simulation, that are just number
    4. A workbook example, would, as always, help.
    i provided

    i need a formula because i have more than 200 rows,
    all for a fifferent time (in colmn)
    so i provide you an other spredsheet but the formula that i would like is to integrate just one raw at time :p
    Attached Files Attached Files

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: integration function

    In A4 and copy down, =EXP(SUMPRODUCT( ($C4:$AZ4 + $B4:$AY4) * (C$3:AZ$3 - B$3:AY$3) ) / 2)

  7. #7
    Registered User
    Join Date
    07-18-2009
    Location
    paris
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: integration function

    yes this is if i just work in the sheet. but if i want ot built a function where imput i can select with mouse from the worksheet?

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: integration function

    You intend to select both the time series and the data series?

  9. #9
    Registered User
    Join Date
    07-18-2009
    Location
    paris
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: integration function

    a function that from data serie from just data take the value of 1/2(the first data+thelastdata)+(SUM(data that are in the middle))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1