StatsReSample *without* replacement

Hello all,

I'm working on a piece of code where I need to take an array and randomize it.

I see that there is a function statsresample that will resample the data, but it does so *with* replacement. Is there a flag or a similar command that will do it *without* replacement?

Basically, I would like to know if there is an analogous function to MATLAB's randsample()

thanks!

d
One of many possible solutions is:

Function getRandomPoints(inWave,numPoints)
Wave inWave // the wave from which you want to sample
Variable numPoints // the number of points you want at the output

Make/O/N=(numPnts(inWave)) tmpWaveN=enise(1)
Duplicate/O inWave, randomOrderWave
Sort tmpWaveN,randomOrderWave
Redimension/N=(numPoints) randomOrderWave
KillWaves/Z tmpWaveN
End


A.G.
WaveMetrics, Inc.