integral3 how can i make it faster?

2 vues (au cours des 30 derniers jours)
DM
DM le 27 Fév 2015
Modifié(e) : DM le 27 Fév 2015
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.

Réponses (1)

John D'Errico
John D'Errico le 27 Fév 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 commentaires
John D'Errico
John D'Errico le 27 Fév 2015
Modifié(e) : John D'Errico le 27 Fév 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?
DM
DM le 27 Fév 2015
Modifié(e) : DM le 27 Fév 2015
Because when I give too much information, I dont get help. I thought keeping it broad might be better.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by