필터 지우기
필터 지우기

integral3 how can i make it faster?

조회 수: 5 (최근 30일)
DM
DM 2015년 2월 27일
편집: DM 2015년 2월 27일
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.

답변 (1개)

John D'Errico
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
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?
DM
DM 2015년 2월 27일
편집: DM 2015년 2월 27일
Because when I give too much information, I dont get help. I thought keeping it broad might be better.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by