function [bkp]=shuffle(bkp,seed)

%Given an array, it unformyly randomly
%shuffles the data in the array.
if nargin>1
   rand('seed',seed);
end

[row,col]=size(bkp);
bkp = [ rand(row,1) bkp ];
bkp=sortrows(bkp,1);
bkp(:,1) = [];
