필터 지우기
필터 지우기

why results from trapz cumtrapz and integral are so different

조회 수: 2 (최근 30일)
Meva
Meva 2015년 4월 7일
댓글: Meva 2015년 4월 7일
Hi,
I need to integrate numerically 21 functions, some of them are
int_0^x (...) % integrate from zero to x
some of them
int_0^x (int_0^x (...)) % integrate from zero to x
then again integrate from 0 to x
some of them
int_0^1( int_0^x (int_0^x (...))) % integrate from zero to one and then
integrate from zero to x
then again integrate from 0 to x
I have two codes. First one uses cumtrapz for
int_0^x
and trapz for
int_0^1 ( ...
Second one uses integral method (with function handle) for all the integrals above.
The results are amazing! They are very different like ten times bigger or smaller from each other.
Which method is trusted?
  댓글 수: 4
Meva
Meva 2015년 4월 7일
and this is the integral method code.
Meva
Meva 2015년 4월 7일
the results might be with different parameters but they are very different as I checked

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by