2021-03-28

Comparing a value from two different arrays in VBA

I am looking to compare a value from two different arrays. If the values are the same within one percent then I want to proceed to use the value in further calculations, else an error message. I have written the code pictured in this link for the conditions that I want to compare the two values based on. I am having trouble with extending it to compare values from two arrays.

Basically I want to compare arrLambdaNRidder(0) to arrLambdaNMLI(0)(these are roots determined through two different root finding methods) and so on for an array that is 0 to optimal roots-1 long. Optimal roots number is determined through a different function. I want to set it in a loop so that I have a variable that goes up one every loop to the optimalRoots number.

Please let me know if you need additional information. Any help or general tips on how to make a loop comparing values in an array would be very helpful. I am very appreciative!!



from Recent Questions - Stack Overflow https://ift.tt/2QMPgcr
https://ift.tt/eA8V8J

No comments:

Post a Comment