Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Excel/VBA Help?

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-18-2013
04:45 PM

12-18-2013
04:45 PM

Excel/VBA Help?

I know that this is technically a Mathcad forum but I have been stuck on an Excel issue for about 3-4 weeks now and I have no idea how to fix it.

I was given a differential equation with an initial condition and a boundary condition. I was suppose to guess an initial condition in place of the boundary condition, then use bracketing and the Brent method combined with the Runge-Kutta method to adjust my guessed initial condition to solve the equation and have it match the given boundary condition.

What I did was guess the initial condition, plug it into my Runge-Kutta method to give me some answer, check that answer with my boundary condition, then use the bracketing and Brent method to adjust my guess and resolve it with the Runge-Kutta. The problem I am having is that the program keeps taking an exponent of a negative number which gives a run-time error 5 when dydx(1) is evaluated. I don't know if I can just put in a safety statement saying if the variable is less an 0, make it 0.

I attached my excel program with the VBA coding, maybe some one can take a look and give me an idea of what I am doing wrong or how to possibly fix it?

Thank you!

Top Tags