The find command can be used on large sets of data to make extraction easy. The command rand generates pseudorandom numbers that are between 0 and 1 in a standard uniform distribution.
a3 = round(100*rand(10,12),0)
b3 = mean(a3)
NOTE: the command rng allows the ‘random’ number to be set to always be the same and will be the same for all students (the number is called the ‘seed’). Set the seed to (081518) and rerun. Using the original seed value, extract all numbers greater than or equal to 48 from the matrix and create a 2 x (n/2) matrix containing the newly extracted values with the first half in the first row and the second half in the second row (n is the length of vector with the indexed values >= 48).
Can someone please help me to understand how this works?