Hello,
E.g. I got an 'X' array with [1 2 3 4] and want to fill an 'Y' array which is length 8. The restrictions are:
– All values of 'X' array must be in the 'Y' array at least once.
– The values of 'X' are picked random and put in the 'Y' array.
An example of array 'Y' = [1 4 3 1 4 2 1 1].
Is there any function in Matlab which can accomplish this?
Thanks for the help!
Best Answer