Calculating Integration including Gamma Function

조회 수: 4 (최근 30일)
pagolmon
pagolmon 2011년 1월 23일
Hi,
I am new to Matlab. I want to calculate the function in the following link. v, delta and L are given. How to calculate this using Matlab?
Thanks in advance
Pagolmon

답변 (2개)

John D'Errico
John D'Errico 2011년 1월 23일
Use a loop to create each term, summing the result as you go. A while loop allows you to do this, with a test inside the while statement to see if the terms are sufficiently small. Or, use a for loop, with a test inside the loop, then a call to break when the terms are sufficiently small.
Compute the terms using the log of each terms, then exponentiate each term before you sum it into the running sum. Gammaln here will be efficient to compute the log of the gamma function, but also the log of the factorial. The avoids partial underflows and overflows inside the terms because you use logs.
Beyond that, just start writing. The way to learn is to write the code yourself. If I do it for you, then you learn nothing.
  댓글 수: 1
pagolmon
pagolmon 2011년 1월 24일
Thanks for the guideline. I will work on it.

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


Walter Roberson
Walter Roberson 2011년 1월 23일
I ran this through a bunch of transformations, and the only one that resulted in any kind of simplification was to rewrite the first term in terms of the binomial function:
sum((1-delta)^n*(GAMMA(v+n, x/delta)/GAMMA(v+n))^L*binomial(v+n-1, n), n = 0 .. infinity)
If you have constraints upon the delta, v, or L values, then it might perhaps be possible to make a further refinement. For example are any of the variables constrained to be positive integers? Is L at least an integer even if possibly negative?
  댓글 수: 2
pagolmon
pagolmon 2011년 1월 24일
Thanks for the reply.
v and L values are positive integers.
In the condition it's written that the equation is exact for L<=2 and approximate for L>2.
v ranges from 0.005~0.01..
delta is equal to the determinant of a symmetric matrix.
Walter Roberson
Walter Roberson 2011년 1월 24일
I investigated further yesterday with L=2 and assumed integral v, but nothing I found could reduce the complexity of the summation in any meaningful form.

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

Community Treasure Hunt

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

Start Hunting!

Translated by