How to evaluate large factorials

조회 수: 14 (최근 30일)
Eric
Eric 2014년 9월 2일
댓글: madhan ravi 2018년 10월 13일
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?

채택된 답변

Andrei Bobrov
Andrei Bobrov 2014년 9월 2일
syms n
subs(n*factorial(n-1),1000)
  댓글 수: 2
Pramit Biswas
Pramit Biswas 2018년 2월 18일
Getting the following in between numbers:
\\\r\n
Walter Roberson
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
hend noda 2018년 10월 13일
if
how this limit get??
  댓글 수: 1
madhan ravi
madhan ravi 2018년 10월 13일
Post a new question because it’s completed different from the original question.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Argument Definitions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by