why does the fist code give me warning while the second code works well?
조회 수: 1 (최근 30일)
이전 댓글 표시
why does the fist code tells me minimum step size reached, while the second one give me no warnings? Thank you very much for your help.
this is the first one:
ff=@(x) 1./x ; b=quad(ff,0,1)
Warning: Minimum step size reached; singularity possible.
> In quad at 103
b =
45.5496
here is the second one:
ff=@(x) sqrt(log(1./x)) ; b=quad(ff,0,1)
b =
0.88621
댓글 수: 0
채택된 답변
Walter Roberson
2011년 10월 8일
The second one has a finite integral over that region, sqrt(pi)/2
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Performance Profiling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!