This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % set state of random generator to inputted value r [x idx] = sort(rand(32,1)); % x is sorted vector of random elements, idx % is index vector for j = 1 : length(idx) sdata(j) = dat(idx(j)); % each element of sdata gets a random element % of dat such that none is repeated end e...
View Full Document
- Fall '07