Question: (Problem 2, Homework 4 revisited.) For the ladder problem described in Problem 2 of Homework 4, develop a VBA function called Ladder(a,b,w1,w2) that has input

 (Problem 2, Homework 4 revisited.) For the ladder problem described in

(Problem 2, Homework 4 revisited.) For the ladder problem described in Problem 2 of Homework 4, develop a VBA function called Ladder(a,b,w1,w2) that has input arguments a, b, w1, and W2 and returns the length of the longest ladder that will fit around a given corner. Your function should use the Golden search method (20 rounds) to find the minimum L (see diagram in Homework 4 assignment) and it is this minimum value of L that is the length of the longest ladder that will fit around the corner. The variables a and b are the initial low and high values used in the Golden search method. The TA should be able to type into a cell on your spreadsheet "=Ladder(0,10,2,3)", for example, and the answer for the longest ladder that fits around the corresponding corner will be output in that cell (no input boxes or message boxes!). Your solution must utilize the Golden Section search method. HINT: If I were you, I would set this up in Excel first (similar to bisection - the solution is found in the Homework 4 Solutions online!) so that you have something to check your function return value against (I've also got an example below). Example Output: B D B C A 1 Problem 1 2 W N A 1 Problem 1 2 3 a 4 b a 0 3 4 b 10 4 w No 5 w1 2 5 w1 w2 3 6 w2 6 7 8 7 Length: =Ladder(C3,C4,C5,C6) 8 Length: 7.023482 (Problem 2, Homework 4 revisited.) For the ladder problem described in Problem 2 of Homework 4, develop a VBA function called Ladder(a,b,w1,w2) that has input arguments a, b, w1, and W2 and returns the length of the longest ladder that will fit around a given corner. Your function should use the Golden search method (20 rounds) to find the minimum L (see diagram in Homework 4 assignment) and it is this minimum value of L that is the length of the longest ladder that will fit around the corner. The variables a and b are the initial low and high values used in the Golden search method. The TA should be able to type into a cell on your spreadsheet "=Ladder(0,10,2,3)", for example, and the answer for the longest ladder that fits around the corresponding corner will be output in that cell (no input boxes or message boxes!). Your solution must utilize the Golden Section search method. HINT: If I were you, I would set this up in Excel first (similar to bisection - the solution is found in the Homework 4 Solutions online!) so that you have something to check your function return value against (I've also got an example below). Example Output: B D B C A 1 Problem 1 2 W N A 1 Problem 1 2 3 a 4 b a 0 3 4 b 10 4 w No 5 w1 2 5 w1 w2 3 6 w2 6 7 8 7 Length: =Ladder(C3,C4,C5,C6) 8 Length: 7.023482

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!