Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
reem123
reem123 am 28 Mär. 2023
Kommentiert: John D'Errico am 3 Apr. 2023
I want to graph R vs g for g=[0, 0.5]
Y axis is restricted (0 to 0.25)
  7 Kommentare
Torsten
Torsten am 29 Mär. 2023
Bearbeitet: Torsten am 29 Mär. 2023
(6*n-1)!! = (6*n)! /( 2^(3*n) * (3*n)! )
Section "Relation to the factorial" under
John D'Errico
John D'Errico am 3 Apr. 2023
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Log Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by