how to calculate the gamma function when the variables are the complex numbers?

35 views (last 30 days)
hello ,everyone! Now I need to calculate the two gamma functions in parabolic nondiffacting optical wavefields, and , where the variables are the complex numbers. In generally, we use the gamma function in MATLAB, which the variables are the real number. so could do please tell me how to calculate the values? Thank you very much!
For more information about gamma function :
"Parabolic nondiffracting optical wavefields,"
Miguel A. Bandres, J. C. Gutiérrez-Vega, and S. Chávez-Cerda
Optics Letters, 29(1), 44-46 (2004) ( http://goo.gl/KhmqQY )

Accepted Answer

Walter Roberson
Walter Roberson on 26 Jul 2021
The Symbolic Toolbox can calculate it.
format long g
a = sym(complex(randn, randn))
a = 
g1 = gamma(1/4 + 1/2*1i*a)
g1 = 
double(g1)
ans =
0.168376614679118 + 0.549688232146916i

More Answers (0)

Community Treasure Hunt

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

Start Hunting!