How to calculate imaginary part of incomplete gamma function in matlab.

조회 수: 2 (최근 30일)
I am calculating the coverage probability of massive MIMO systems. During which i need to calculate imaginary part of incomplete gamma function. But i run code shown below error is:Undefined function 'gammanic' for input arguments of type 'double'.
Error in i_gamma (line 3) y= exp(gammanic(2/a, 2*1i));
Code is as follows
syms y z
a=4;
y= exp(gammanic(2/a, 2*1i));
z =imag(y)
Thanks in advance.

채택된 답변

Karan Gill
Karan Gill 2017년 9월 12일
편집: Karan Gill 2017년 10월 17일
You can find "gammainc" for imaginary input values using the Symbolic "igamma" function. Carefully read the note in the "Description" on how to do this: https://www.mathworks.com/help/symbolic/igamma.html
  댓글 수: 2
Shweta Rajoria
Shweta Rajoria 2017년 9월 13일
Thank you Karan sir my problem is solved with this.
Karan Gill
Karan Gill 2017년 9월 14일
Great! Could you please accept my answer?

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

추가 답변 (1개)

John D'Errico
John D'Errico 2017년 9월 11일
편집: John D'Errico 2017년 9월 11일
I might point out that gammainc is the name of the incomplete gamma function. Not gammanic. Misspelling a function name tends to work poorly.
Regardless, It looks like gammainc does not accepts complex arguments. As well, the symbolic toolbox does not have an incomplete gamma.
Finally, you state that you need to compute the imaginary part of the GAMMA function. You did not say you need the INCOMPLETE gamma function. So if you really need gamma, why are you apparently trying to use gammainc?
To quote you: "How to calculate imaginary part of gamma function in matlab."
  댓글 수: 1
Shweta Rajoria
Shweta Rajoria 2017년 9월 11일
Thanks for the answer sir. I want to calculate it for gammainc by mistake i have written gamma. If you have any idea then please explain. Thanks in advance.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by