factorial
シンボリック入力の階乗
説明
例
シンボリック数の階乗
シンボリック式の階乗関数の計算
シンボリック式の階乗関数を計算します。factorial
は正確なシンボリック出力を関数呼び出しとして返します。
syms n
expr = n^2 + 1;
f = factorial(expr)
f =
n = 3
の値の階乗を計算します。subs
を使用して n
の値を代入します。
fVal = subs(f,n,3)
fVal =
階乗関数の微分
階乗関数の展開
階乗関数の極限
配列入力の階乗の計算
入力引数
n
— 入力
数値 | ベクトル | 行列 | 配列 | シンボリック数 | シンボリック変数 | シンボリック配列 | シンボリック関数 | シンボリック式
入力。数値、ベクトル、行列、または配列、あるいはシンボリック数、変数、配列、関数、または式で指定されます。
詳細
階乗関数
数値の階乗 n は次のように定義されます。
0 の階乗は 1 となります。
ヒント
シンボリック オブジェクトではない数値について
factorial
を呼び出すと、MATLAB® 関数factorial
が呼び出されます。
バージョン履歴
R2012a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)