Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to generate the matrix of 10× 10 in matlab? All matrices are required to be integers with no duplicate values.
How to generate the matrix of 10× 10 in matlab? All matrices are required to be integers with no duplicate values.
If there is no special requirement, you can make it with the following statement.

For example:

Because i= 1: 10.

A(i,)= 10 *(I- 1)+rand perm( 10);

end

A

Matrix can be generated.

A =

7 3 8 9 2 6 10 4 1 5

20 15 14 1 1 16 17 18 19 12 13

23 28 2 1 29 26 27 25 22 24 30

40 33 38 37 34 32 3 1 35 36 39

44 50 48 45 46 47 49 43 4 1 42

60 59 57 52 5 1 58 54 53 56 55

70 63 62 69 65 66 6 1 68 67 64

73 80 75 7 1 79 74 78 77 72 76

82 83 85 89 84 90 8 1 88 87 86

98 99 100 96 95 9 1 93 94 97 92