Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

kshuffle.m 569 B

123456789101112131415161718192021
  1. function shuffledArray = kshuffle(inputArray, DIM)
  2. %
  3. % shuffledArray = kshuffle(inputArray, DIM)
  4. %
  5. % Shuffles a matrix by row or column dimension.
  6. %
  7. % Kian Torab
  8. % kian.torab@utah.edu
  9. % Department of Bioengineering
  10. % University of Utah
  11. % Version 1.1.0 - March 4, 2010
  12. switch DIM
  13. case 'row'
  14. shuffledArray = inputArray(randperm(size(inputArray, 1)), :);
  15. case 'column'
  16. shuffledArray = inputArray(:, randperm(size(inputArray, 2)));
  17. otherwise
  18. disp('DIM is invalid. See HELP for more information.');
  19. end