Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Jan 4, 2002
Messages
470
Location
US
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.
 
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)
 
Try the open source DOSBox emulator for windows it will allow you to run DOS applications that doesn't work in native Windows. I am not sure if it works with Vista but I use it to run DOS applications with graphics that does run under XP.

 
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

Back
Top