Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numerical Integration 1

Status
Not open for further replies.

trashcanman

Mechanical
Jan 4, 2002
469
I am trying to figure out how to do numerical integration, using Simpson's Rule. I could easily do it with Basic, but dang Vista won't run GW Basic. I could also do it with about 1000 rows and then sum it up, but want to avoid that.

It is simply evaluate f(x)*constant, store it, recalculate f(x+dx)*constant, add that to 1st value, recalculate (f(x+dx+dx)*constant, add that, on and on till it reaches the upper limit.

Is there a way to do it using the automatic iteration feature (under Tools)? It would be a sort of FOR TO type statement. Goal Seek won't work, as I am just trying to sum up a lot of calculations, not find a root.
 
Replies continue below

Recommended for you

It's easy to do with VBA in Excel.

Good luck,
Latexman
 
I'd just do it on the worksheet itself, as in
but if you are keen on Basic then VBA is worth learning.


or




Cheers

Greg Locock

SIG:please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Thanks, that is some good info. Now, I have to learn VBA (sigh)
 
What does DOSBox have to do with this thread?

The integration as was mentioned can easily be performed in excel or vba.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
electricpete

trashcanman complained that GWbasic doesn't run under Vista therefore looked for a spreadsheet alternative. Under DOSbox GWbasic probably may run in Vista.
 
You can get Visual Studio Express for C++ or Visual Basic for free from Microsoft. The core of your GWBasic algorithm can probably be ported to VB Express with relatively minor mods.

TTFN

FAQ731-376
 
israelkk - thanks. I understand now.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
Hey Feric, you are correct, QB4.5 runs okay in Vista. Thanks. Now I can rock and roll.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor