How to evaluate large factorials
14 views (last 30 days)
Show older comments
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?
0 Comments
Accepted Answer
Andrei Bobrov
on 2 Sep 2014
syms n
subs(n*factorial(n-1),1000)
2 Comments
Walter Roberson
on 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.
More Answers (1)
hend noda
on 13 Oct 2018
if
how this limit get??
1 Comment
madhan ravi
on 13 Oct 2018
Post a new question because it’s completed different from the original question.
See Also
Categories
Find more on Argument Definitions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!