How to evaluate large factorials

21 Ansichten (letzte 30 Tage)
Eric
Eric am 2 Sep. 2014
Kommentiert: madhan ravi am 13 Okt. 2018
In Mathematica I could easily evaluate factorials, including large ones like 1000!
But in Matlab I can only evaluate up to 170!, because any number beyond that is greater than realmax, so the program gives me back infinity.
In another topic a user suggested that I should use the symbolic toolbox in this case.
My question is, how I do that? Is there any alternative way?

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 2 Sep. 2014
syms n
subs(n*factorial(n-1),1000)
  2 Kommentare
Pramit Biswas
Pramit Biswas am 18 Feb. 2018
Getting the following in between numbers:
\\\r\n
Walter Roberson
Walter Roberson am 18 Feb. 2018
You can char() the result and delete those \ and r and n characters.
The characters are caused by a bug in the Symbolic Toolbox in your release.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

hend noda
hend noda am 13 Okt. 2018
if
how this limit get??
  1 Kommentar
madhan ravi
madhan ravi am 13 Okt. 2018
Post a new question because it’s completed different from the original question.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Argument Definitions finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by