在Matlab中计算第一类合流超几何函数
Computation of Confluent Hypergeometric Function of the First Kind in Matlab
有没有办法在 Matlab 中(特别是在 R2013a 中)执行第一类合流 yypergeometric 函数的计算?
在 Mathematica 中,此函数称为 Hypergeometric1F1
。我在 Matlab 中看到 kummerU
,但定义看起来不同。
在 Mathematica 中,definition is:
在 Matlab 中,definition is 给出为:
如何在 Matlab 中计算第一类合流超几何函数,即两个积分中的第一个?
两者是不同的,因为它们 return 对相同的二阶 ODE 有不同的解,但名称会使它们很容易混淆。 Mathematica 的 Hypergeometric1F1
calculates the confluent hypergeometric function, also known as Kummer's function. Matlab's kummeru
calculates the confluent hypergeometric Kummer U function, also known as Tricomi's confluent hypergeometric function. The two are related by a simple relation, as shown here (see also the relations here and here).
在 Matlab 中,您可以通过通用 hypergeom
函数以符号方式计算合流超几何函数(如果所有输入参数都是浮点数,则数值解为 returned):
A = hypergeom(a,b,z);
这将 return 的结果等同于 Mathematica 的 Hypergeometric1F1
。如果您需要更快的解决方案,可以尝试我优化的 hypergeomq
described in this Math.SE answer. For a purely numeric solution, you could also try this File Exchange submission
在 Mathematica 中,您可以使用 HypergeometricU
生成等同于 Matlab 的 kummeru
的结果。
有没有办法在 Matlab 中(特别是在 R2013a 中)执行第一类合流 yypergeometric 函数的计算?
在 Mathematica 中,此函数称为 Hypergeometric1F1
。我在 Matlab 中看到 kummerU
,但定义看起来不同。
在 Mathematica 中,definition is:
在 Matlab 中,definition is 给出为:
如何在 Matlab 中计算第一类合流超几何函数,即两个积分中的第一个?
两者是不同的,因为它们 return 对相同的二阶 ODE 有不同的解,但名称会使它们很容易混淆。 Mathematica 的 Hypergeometric1F1
calculates the confluent hypergeometric function, also known as Kummer's function. Matlab's kummeru
calculates the confluent hypergeometric Kummer U function, also known as Tricomi's confluent hypergeometric function. The two are related by a simple relation, as shown here (see also the relations here and here).
在 Matlab 中,您可以通过通用 hypergeom
函数以符号方式计算合流超几何函数(如果所有输入参数都是浮点数,则数值解为 returned):
A = hypergeom(a,b,z);
这将 return 的结果等同于 Mathematica 的 Hypergeometric1F1
。如果您需要更快的解决方案,可以尝试我优化的 hypergeomq
described in this Math.SE answer. For a purely numeric solution, you could also try this File Exchange submission
在 Mathematica 中,您可以使用 HypergeometricU
生成等同于 Matlab 的 kummeru
的结果。