J
Jie
I have an array like below:
@Big_array = (1, 2, 3, 4, 6, 7,10);
now I need to randomly generates a sub-array with 3 elements only,
say.
i tried to read the documentation for rand() but could not find the
solution. most of the examples online is talking about how to generate
ONE random element, but i need 3....
I guess it would something like below, but it does not work....
@new_array = rand(3, @Big_array)
Jie
@Big_array = (1, 2, 3, 4, 6, 7,10);
now I need to randomly generates a sub-array with 3 elements only,
say.
i tried to read the documentation for rand() but could not find the
solution. most of the examples online is talking about how to generate
ONE random element, but i need 3....
I guess it would something like below, but it does not work....
@new_array = rand(3, @Big_array)
Jie