×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Numerical Integration

Numerical Integration

Numerical Integration

(OP)
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.

RE: Numerical Integration

It's easy to do with VBA in Excel.

Good luck,
Latexman

RE: Numerical Integration

I'd just do it on the worksheet itself, as in http://oregonstate.edu/instruct/ch490/lessons/lesson11_files/CURVAREA.XLS

but if you are keen on Basic then VBA is worth learning.

http://www.mathhelpforum.com/math-help/computer-software/31305-excel-vba-simpsons-rule.html

or

http://www.mrexcel.com/forum/archive/index.php/t-99062.html

 

Cheers

Greg Locock

SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.

RE: Numerical Integration

(OP)
Thanks, that is some good info.  Now, I have to learn VBA (sigh)

RE: Numerical Integration

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.

RE: Numerical Integration

electricpete

trashcanman complained that GWbasic doesn't run under Vista therefore looked for a spreadsheet alternative. Under DOSbox GWbasic probably may run in Vista.

RE: Numerical Integration

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: Eng-Tips.com Forum Policies

RE: Numerical Integration

israelkk  - thanks. I understand now.

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

RE: Numerical Integration

Hi there:

QuickBASIC runs under Vista -- QuickBASIC should take GWBASIC with no problem (just cut and paste)...

Thanks,

Gordan

http://engware.i-dentity.com

RE: Numerical Integration

(OP)
Hey Feric, you are correct, QB4.5 runs okay in Vista.  Thanks.  Now I can rock and roll.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources