Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi, can you write VBA code in excel that compares the roots obtained from two different methods/functions? IF the values are the same within 1%

Hi, can you write VBA code in excel that compares the roots obtained from two different methods/functions? IF the values are the same within 1% then proceed with the calculation, ELSE send back an error message.

Can you call this function 'CompareLamdbas'? I want to compare the values from 'LamdaMRidder' to 'LamdaMMLP'

Thank you, I hope I have given you enough information to write the code. If you need any further clarification or additional context/information please let me know.

EDIT: I was given a non-linear equation for which I had to determine the roots using two different root-finding methods. Now, I need to write a code in VBA that compares the value obtained using one of the methods, so the value from function 1, to the value from the other method, say function 2. I need assistance on how to format this code and the IF statement. This function will serve as a check. If the values are within 1% of each other then it verifies that the value is good and can be used in further calculations. Else, I need to display some sort of error message to stop.

Basically I just need help with the format of the actual code that I can then apply to this larger scenario. Just something general that shows me how to compare the values and verify that they are approximately equal.

I hope this is more clear, if not I can try to explain further.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

5. Identify strategies for building coalitions across cultures.

Answered: 1 week ago