I want to graph R vs. g for n=0,1 and 2.

2 次查看(过去 30 天)
I want to graph R vs g for g=[0, 0.5]
Y axis is restricted (0 to 0.25)
  7 个评论
Torsten
Torsten 2023-3-29
编辑:Torsten 2023-3-29
(6*n-1)!! = (6*n)! /( 2^(3*n) * (3*n)! )
Section "Relation to the factorial" under
John D'Errico
John D'Errico 2023-4-3
As a hint, I would compute each term as the sum of the logs of each part of those elements. Only at the end do you exponentiate the result. If not, expect to rapidly see underflows or overflows, or maybe both at once.
As a second hint, how do you compute the log of a factorial? The simplest way is to use the relationship of the factorial to the gamma function, and to then realize that MATLAB provides the function gammaln, which computes the natural log of the gamma function.
Alternatively, you would find that Stirling's approximation is actually quite accurate for the factorial, and it is easily logged. Or, you could compute the log of a factorial as the sum of the logs of the integers in the necessary product. Even so, just use gammaln.
Finally, Torsten gave you a relation for the double factorial
In the end though, you need to put it together as this is your assignment, not ours. At the very least, you need to make a credible effort.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Log Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by