focus expression text field at startup -> version 1.2
[LeanCalc.git] / help / randperm
1 NAME
2     randperm - randomly permute a list or matrix
3
4 SYNOPSIS
5     randperm(x)
6
7 TYPES
8     x           list or matrix
9
10     return      same as x
11
12 DESCRIPTION
13     For a list or matrix x, randperm(x) returns a copy of x in which
14     the elements have been randomly permuted.  The value of x is not
15     changed.
16
17 EXAMPLE
18     > A = list(1,2,2,3,4)
19     > randperm(A)
20
21     list (5 elements, 5 nonzero):
22           [[0]] = 4
23           [[1]] = 1
24           [[2]] = 2
25           [[3]] = 3
26           [[4]] = 2
27
28     > randperm(A)
29
30     list (5 elements, 5 nonzero):
31           [[0]] = 2
32           [[1]] = 1
33           [[2]] = 4
34           [[3]] = 2
35           [[4]] = 3
36
37 LIMITS
38     none
39
40 LINK LIBRARY
41     none
42
43 SEE ALSO
44     XXX - fill in
45