By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,650 Members | 753 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,650 IT Pros & Developers. It's quick & easy.

Vis basic and Bisection method

P: 1
Hi. I'm looking for some help with the Bisection method in Visual Basic, which I'm using for the first time as part of a university project. I am using the bisection method to work out the water level of a river for a given flow.

My variables are Wla, Wlb, Wlc, I have a sub routine called Qcalculate which calculates the discharge using the bisection method.

My problem is my original Wlb, I did have it set at a ridiculously high level that will always be higher than the water level for any Q set, but my tutor has mentioned that theoretically he could always specify a level of flow (Q) that will lead to my Wlb being too low and as such I will get an endless loop in my Qcalculate subroutine.

So I am looking for a bit of code that ensures (in a loop?) that the Q for Wlb will be higher than the given Q.

Really sorry if this post doesn't fully explain my problem but Iím groping around in the dark due to my lack of knowledge of the platform I'm using! Any help would be amazing, thanks a lot. Laurence
Jan 9 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 8,434
Perhaps you could show us the Qcalculate routine?
Jan 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.