(translator=pacific, ChineseSource=pacific-20020703-8\randperm.html, EnglishSource=c:\matlabr12\help\techdoc\ref\randperm.html)
| MATLAB Function Reference |
 |
randperm
隨機排列。
Syntax
p = randperm(n)
Description
p = randperm(n)
將1:n 的整數隨機排列。
Remarks
randperm 函式先去呼叫 rand
函式並改變 rand 函式的狀態。
Examples
randperm(6) 可能是下列向量:
[3 2 6 4 1 5]
或是 1:6 的其他排列順序。
See Also
permute
| randn | | rank |  |