hello guys, what code can i use to generate a mxn matrix provided that the value is from 1 to x(depending on the desire of user) and the values should be unique from each other. ๐
MATLAB: How can I generate a random matrix
functionrandreshape
Related Solutions
It creates a (3*m x n) vertically concatenated matrix of the three โpagesโ of the 3D matrix โxโ.
>> X = [1;2;3;4;5;6];>> Y = bsxfun(@plus,X,0:10:40);>> Z = bsxfun(@plus,Y(:),0:20);>> ZZ = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
Best Answer