Sample - aleslab/Psychtoolbox-3-aleslab-fork GitHub Wiki
[Y,index] = Sample(X)
Returns a random sample from X.
If X is a vector, returns a scalar sample from X, so Y = X(index).
If X is an m-by-n matrix, m>1 && n>1, samples each column of X:
for j=1:n, Y(j)=X(index(j),j).
Also see RandSample, Shuffle, SORT, and Randi.
Path Retrieve current version from GitHub | View changelog
Psychtoolbox/PsychProbability/Sample.m