How to use the factorial function in Matlab

조회 수: 1 (최근 30일)
Nghia
Nghia 2013년 12월 25일
답변: Walter Roberson 2013년 12월 25일
Hi everybody, I have a problem with Factorial function.
I wrote:
syms x
f= factorial(x)
....
(I want to calculate the limit of some function...)
Immediately, Matlab annouce: "??? Error using ==> factorial at 17 N must be a matrix of non-negative integers."
How can I fix this error? I want to calcualate the limit of y=f(x)=9^x/(x!)
Thanks.

채택된 답변

Walter Roberson
Walter Roberson 2013년 12월 25일
Try
f = sym('x!');

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by