필터 지우기
필터 지우기

Partial Integration in Matlab r2015a

조회 수: 3 (최근 30일)
Fakhri Alifin
Fakhri Alifin 2020년 10월 7일
댓글: Kevin Zheng 2020년 12월 13일
Hello everybody,
I have a question about partial integration in matlab r2015a
I have an equation that is
f(s,n) = int(s*f_gamma(s,n),s,0,W)
I want to integrate s*f_gamma(s,n) partially because it won't work if I integrate it with normal integral function,
but in matlab r2015a, there is no integrateByParts(f,du) command.
So, anyone can give me some suggestions? It will help me a lot
Thanks.
  댓글 수: 1
Kevin Zheng
Kevin Zheng 2020년 12월 13일
I don't really like to give non-answer answers, but if you want to compute indefinite integrals, I would suggest using something like WolframAlpha, or Wolfram Mathematica as opposed to Matlab.
If you actually just want to compute a definite integral, then you can do this.
integral(@(s) s .* f_gamma(s, n), 0 , W)
Before, you were trying to muliply a number with a function, which mathematically is fine, but programmically isn't since a function is pretty complicated. This code snippet will create a new function whose content is s .* f_gamma(s, n), then integrate it. Of course, I hope the variable n is already defined yes?
Read more here https://www.mathworks.com/help/matlab/matlab_prog/anonymous-functions.html

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

답변 (0개)

카테고리

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

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by