473,385 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need some tips about bisection method in VB

Hey guys!

I am beginner at VB studying. I got confused with solve the functions by applying bisection method in VB. Basically I can understand the bisection method mathmatically. However i got stucked when i trying to write a code for it.

My code writing is

Dim xr, xl, xm as double

do
xl=0 (coz the domain is greater than 0)
xm=(xl+xr)/2
if (f(xl)) *( f(xm))>0 then
xl=xm
else
xr=xm
loop

can anyone give some tips on this
Oct 10 '06 #1
2 5673
scripto
143 100+
Dim xr, xl, xm as double


Your Dim statment is incorrect - it should read

dim xr as double, xl as double, xm as double

if you don't do it this way, then as per your code, xr and xl are variants. Try that.
Oct 10 '06 #2
scripto
143 100+
you also have a never ending loop here.

here is a link to a wonderfull example

http://en.wikipedia.org/wiki/Bisection_method
Oct 10 '06 #3

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

Similar topics

18
by: anand | last post by:
*********************************************************************************************************** #include<stdio.h> #include<conio.h> #include<math.h> void main() { double...
3
by: raajagopal.v | last post by:
hallo comp.lang.c i am a student trying to sole the bisection method in numerical methods to find the root of any equation,i need the coding because i dont know how to implement the polynomial...
8
by: aruna | last post by:
to write a c program to find the roots of the equation using bisection method that too using array or pointers
1
by: beneyam | last post by:
i want to develop a program on bisection method using c++. the program should ask user to enter the function and the no of iterations at the run time. any one do this i really appreciate. 10qs 4...
2
by: Baba sina | last post by:
How can I solve f(x) with bisection method with the interval ?
1
by: zxipo | last post by:
the numerical prolem is is x*x*x*x-4*x-10=0 this to be solve by bisection method
0
by: jhen61315 | last post by:
Hello there, First time here in forum, I hope im welcome here.... And I hope you'll help me in my assignment in bisection method because i dont know how to start to make in visual basic.. If you...
1
by: lhbrown | last post by:
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.