PsychRandSample

>Psychtoolbox>PsychProbability

x=PsychRandSample(list,[dims])

Returns a random sample from a list. The optional second argument may be
used to request an array (of size dims) of independent samples. E.g.
PsychRandSample(-1:1,[10,10]) returns a 10x10 array of samples from the list
-1:1. PsychRandSample is a quick way to generate samples (e.g. visual noise)
from a bounded Gaussian distribution. Also see RAND, RANDN, Randi,
Sample, and Shuffle.

“list” can be a double, char, cell, or struct array, but it must be a
vector (1xn or nx1). In the future, we may accept matrices (mxn) and treat
columns separately, as other Matlab functions do.

Path   Retrieve current version from GitHub | View changelog
Psychtoolbox/PsychProbability/PsychRandSample.m