Numerical Integration by Matlab

Please mention about the tolerance of accuracy

댓글 수: 9

James Tursa
James Tursa 2020년 12월 28일
편집: James Tursa 2020년 12월 29일
What have you done so far? What specific problems are you having with your code? Are you directed to use a specific technique to come up with an approximation?
Andy Tan
Andy Tan 2020년 12월 29일
I don't know how to start,can you provide me the answer?no,I am not directed to use a specific technique to come up with an approximation
Walter Roberson
Walter Roberson 2020년 12월 29일
integral()
Andy Tan
Andy Tan 2020년 12월 29일
I can't just use the command,I want the code written by ourselves
Walter Roberson
Walter Roberson 2020년 12월 29일
You said that you are not directed to use a specific technique, so you can use integral(). Or vpaintegral().
Andy Tan
Andy Tan 2020년 12월 29일
but if I use integral,I can't set the tolerance of accuracy?
Walter Roberson
Walter Roberson 2020년 12월 29일
https://www.mathworks.com/help/matlab/ref/integral.html#btbbkta-1-AbsTol
Andy Tan
Andy Tan 2020년 12월 29일
I have tried but I want to set the tolerance of accuracy 10^-7 but the the results shown in the Matlab is 4decimal places,I don't think the AbsTol is effective?
Give the command
format long g
and then display the result again.
By default, MATLAB only displays 4 decimal places, but the values are stored internally to higher precision.

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

답변 (1개)

James Tursa
James Tursa 2020년 12월 28일
편집: James Tursa 2020년 12월 29일

0 개 추천

Hint: You might look here:
Knowing that the integral of the Normal density function from -infinity to +infinity is 1 exactly, maybe you can come up with a change of integration variable to get that equation in a form that matches your integral to get the exact answer directly. Starting with a standard Normal density function (mu=0, sigma=1), it is a pretty easy substitution from there to get what you have.

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

질문:

2020년 12월 28일

댓글:

2020년 12월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by