How to evaluate large factorials
조회 수: 14 (최근 30일)
이전 댓글 표시
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
채택된 답변
Andrei Bobrov
2014년 9월 2일
syms n
subs(n*factorial(n-1),1000)
댓글 수: 2
Walter Roberson
2018년 2월 18일
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.
추가 답변 (1개)
hend noda
2018년 10월 13일
if
how this limit get??
댓글 수: 1
madhan ravi
2018년 10월 13일
Post a new question because it’s completed different from the original question.
참고 항목
카테고리
Help Center 및 File Exchange에서 Argument Definitions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!