I need approssimation of pi with x digits
Ältere Kommentare anzeigen
Hi, i would need to choose number of significative digits with which display, for example, pi or another value. Is there a way to set this?
1 Kommentar
Daniel Shub
am 9 Dez. 2011
What have you tried so far?
Antworten (3)
Robert Cumming
am 8 Dez. 2011
help format
help fprintf
1 Kommentar
Walter Roberson
am 8 Dez. 2011
And if more than 15 digits are required, then switch to the Fixed Point toolkit or the Symbolic Toolkit.
Matman86 Di
am 8 Dez. 2011
0 Stimmen
1 Kommentar
Walter Roberson
am 8 Dez. 2011
Not possible. If I set h to be 0 or negative, the result of the summation can never be positive.
Matman86 Di
am 8 Dez. 2011
0 Stimmen
1 Kommentar
Walter Roberson
am 8 Dez. 2011
All that tells is us that h is (in the absence of further assumptions) not 1/0 . N is not bound by the problem, so we are free to set it to any number we choose, including N = -1/50 (leading to h = -50) or to N = infinity (leading to h = 0).
Keep in mind, when considering this, that the problem statement has left us open to using any arbitrary lower bound on the summation, since no lower bound was given. And effectively any arbitrary upper bound too, since the upper summation bound, n, does not otherwise appear in the problem statement.
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!