ドキュメンテーションヘルプ センター
最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。
可能なすべての置換
P = perms(v)
例
P = perms(v) は、ベクトル v のすべての要素を逆辞書式順序で置換したものを含む行列を返します。P の各行は、v の n 個の要素の異なる置換を含みます。行列 P は v と同じデータ型で、n! 行 n 列をもちます。
v
P
すべて折りたたむ
v = [2 4 6]; P = perms(v)
P = 6×3 6 4 2 6 2 4 4 6 2 4 2 6 2 6 4 2 4 6
v = uint16([1023 4095 65535]); P = perms(v)
P = 6x3 uint16 matrix 65535 4095 1023 65535 1023 4095 4095 65535 1023 4095 1023 65535 1023 65535 4095 1023 4095 65535
v = [1+1i 2+1i 3+1i]; P = perms(v)
P = 6×3 complex 3.0000 + 1.0000i 2.0000 + 1.0000i 1.0000 + 1.0000i 3.0000 + 1.0000i 1.0000 + 1.0000i 2.0000 + 1.0000i 2.0000 + 1.0000i 3.0000 + 1.0000i 1.0000 + 1.0000i 2.0000 + 1.0000i 1.0000 + 1.0000i 3.0000 + 1.0000i 1.0000 + 1.0000i 3.0000 + 1.0000i 2.0000 + 1.0000i 1.0000 + 1.0000i 2.0000 + 1.0000i 3.0000 + 1.0000i
logical
char
アイテムの集合。数値、logical または char 値のベクトルとして指定します。
例: [1 2 3 4]
[1 2 3 4]
例: [1+1i 2+1i 3+1i 4+1i]
[1+1i 2+1i 3+1i 4+1i]
例: int16([1 2 3 4])
int16([1 2 3 4])
例: ['abcd']
['abcd']
例: [true false true false]
[true false true false]
データ型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char 複素数のサポート: あり
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
perms(v) は、length(v) が 10 未満の場合に実際に適用できます。
perms(v)
length(v)
この関数は GPU 配列を完全にサポートしています。詳細については、GPU での MATLAB 関数の実行 (Parallel Computing Toolbox)を参照してください。
nchoosek | permute | randperm
nchoosek
permute
randperm
この例の変更されたバージョンがシステム上にあります。代わりにこのバージョンを開きますか?
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office