integral3 how can i make it faster?
3 views (last 30 days)
Show older comments
I am using integral3 numerical integration to evaluate an integral whose result should end up with a number between 0 and 1 which is the best method and what is the best tolerance to pick?
i.e is is the abstol, reltol, do I choose iterated or tiled.
I am looking to run my integral3 faster, it is super slow and frustrating.
0 Comments
Answers (1)
John D'Errico
on 27 Feb 2015
There is no "best" tolerance. If there was, the code would use it. No such thing.
Best would surely be defined differently for everyone, since someone might just want a quick and very approximate answer, whereas someone else will want the answer correct to within the eyelash of a gnat.
As for making it faster, if it was easily made faster, the person who wrote the code would have done so in the first place. You and every other user of a computer always wants it to run faster. The best way to ensure that is to buy a faster computer.
You need to accept that multidimensional numerical integration of a general function is a computationally intensive thing. Without knowing anything at all about your kernel, it is literally impossible to guess how you might make it faster.
You MIGHT be able to do something, by using the profile tool on your function. Perhaps there are optimizations you might achieve. For me to know what you might do is tough, as my crystal ball is always on the fritz. (Extra points to anyone who knows where the phrase "on the fritz" comes from.)
3 Comments
John D'Errico
on 27 Feb 2015
Edited: John D'Errico
on 27 Feb 2015
So then why are you asking again only one day later? And giving essentially no useful information and wildly less information than your first question?
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!