hypergeom function, no output

조회 수: 2 (최근 30일)
Sabhrant
Sabhrant 2024년 4월 14일
편집: Torsten 2024년 4월 15일
I am trying to compute the sum "hypergeom([0.5 1 0.4 0.9],[0.95,1.45,1.4],-1)" in Matlab R2022a, but the function is not returning a value even after 5 minutes of waiting. On Mathematica, running the code "HypergeometricPFQ[{0.5 , 1, 0.4, 0.9}, {0.95, 1.45, 1.4}, -1]" immeditely returns as 0.928766. I am unable to understand why this sum is not getting computed. Is this a bug in the hypergeom function?
  댓글 수: 2
Sabhrant
Sabhrant 2024년 4월 14일
편집: Sabhrant 2024년 4월 14일
Aah I see. Is there a way to know before hand, for which inputs it does analytic continuation?
Torsten
Torsten 2024년 4월 14일
편집: Torsten 2024년 4월 15일
The sum diverges for z = -1, and the analytical continuation seems to take quite a long time, especially at the boundary of the convergence radius (see below for the convergence criteria for the hypergeometric function).

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

채택된 답변

Torsten
Torsten 2024년 4월 14일
이동: Torsten 2024년 4월 14일
The hypergeometric function has convergence criteria:
  • Converges if pq and |z| < ∞.
  • Converges if p = q + 1 and |z| < 1. For |z| >= 1, the series diverges, and is defined by analytic continuation.
  • Diverges if p > q + 1 and z ≠ 0. Here, the series is defined by an asymptotic expansion of pFq(a;b;z) around z = 0. The branch cut is the positive real axis.
And the analytic continuation takes quite long ...
format long
hypergeom([0.5 1 0.4 0.9],[0.95,1.45,1.4],-0.999999999999)
ans =
0.928766175273251
  댓글 수: 1
Sabhrant
Sabhrant 2024년 4월 14일
Thank you. I understand now.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by