+ Reply to Thread
Results 1 to 1 of 1

Finding maximum using bisection/iterative method?

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    15

    Finding maximum using bisection/iterative method?

    I'm a little stumped on this and think I would benefit greatly from extra brains

    In VBA I have an array that I perform a calculation on. The calculation uses a variable that can be any value between [0, 1]. Anytime the variable changes, the array changes too. I have been using Excel solver to basically "maximize" the function, but after moving most of my code off-page, I think I could do the same using some iteration. I've looked around and found something similar to what I'm looking for but it's bending my mind a little.

    Here's the logic chain:
    1) Calculation on array performed using 2 fixed inputs and initial variable input X (i.e. close to zero)
    2) X is changed. Array calculation performed again.
    3) Ideally, X changes until either A) the array is maximized or its equivalent for me, which would be B) the tolerance level is reached (i.e. array sum changes this iteration <= 0.001 or whatever)

    It's almost like a feedback loop, X changes so the array changes so X changes again and so forth until it reaches the maximum/tolerance level. Computing the derivative and solving for zero doesn't seem feasible and may not be possible in Excel VBA, but I think an iterative method would work considering the interval of possible values is fixed. Where I'm having trouble is figuring out how to feed the array into a function for the X calculation and feeding the "new" X back into the array calculation.

    Ideas? Thanks.
    Last edited by peepingtom; 06-05-2014 at 12:23 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Finding Interest Rate Using Loan Constant - Iterative Calculation
    By Jason Carlos in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-09-2014, 08:49 PM
  2. Finding Interest Rate Using Loan Constant - Iterative Calculation
    By Jason Carlos in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-09-2014, 12:49 PM
  3. Bisection Method VBA Code Problem
    By szhengyi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2013, 06:08 AM
  4. Iterative method
    By ya7omar in forum Excel General
    Replies: 2
    Last Post: 11-03-2009, 03:29 AM
  5. Bisection method
    By rosh72851 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2008, 03:01 PM

Tags for this Thread

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