integral3 how can i make it faster?
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
John D'Errico
2015-2-27
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 个评论
John D'Errico
2015-2-27
编辑:John D'Errico
2015-2-27
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?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!