Definite Integration in Matlab

조회 수: 1 (최근 30일)
Protyush
Protyush 2013년 7월 4일
I have been working hard on it, but do not seem to have a clue....
I have a symbolic function f(a very complicated function). I want to integrate the function with limits say:: a(lower) to b(higher)
if true
% code
{
k=int(f,a,b);
k=vpa(k);
}
With the last sentence it should give numerical output, but instead, it simply shows:
numeric::Int(f)
But when I decrease the upper limit(b), it works fine(gives a numeric output). I cannot change the limit.
Hence, it seems that when the upper limit goes above a certain value, it doesn't give a numeric output. I cannot even use trapz and other functions, it drastically increases the time. It's a very lengthy program.
Thanx

채택된 답변

Walter Roberson
Walter Roberson 2013년 7월 4일
I think it likely that with the higher b, the numeric integrator is detecting that you are exceeding the tolerance for integration error.
What happens if you do something like
k = int(f,a,c) + int(f,c,b);
where c is an intermediate point known to be small enough to integrate successfully ?
  댓글 수: 1
Protyush
Protyush 2013년 7월 4일
Thanx a lot dude....guess it never struck my mind...

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by