function [X,Y]=shuffleDataSet(X,Y) % function [X,Y]=shuffle(X,Y) % % Shuffle randomly the rows of X. If Y is also supplied % the rows of Y are shuffled in the same order. X and Y % may be sparse matrices. % % Guy Lebanon, Sept 2003. p=randperm(size(X,1)); X=X(p,:); if nargin==2, Y=Y(p,:); end return;