randpermquick (Scripts) Publisher's description
from Joachim Selke
You can generate random permutations using MATLAB's randperm function
You can generate random permutations using MATLAB's randperm function. Unfortunately, thius function is quite inefficient since it is implemented by sorting a list of random numbers. This requires time O(n * log(n)).
Using the Knuth shuffle algorithm this operation only takes time O(n). This package implements the Knuth shuffle.
Usage: Simply use randpermquick(n) instead of randperm(n).
Note that the file randpermquick_helper.c has to be compiled before randpermquick can be used.
System Requirements:MATLAB 7.6 (R2008a)
Program Release Status: New Release
Program Install Support: Install and Uninstall