Random Latin square

Generate a uniformly distributed random Latin square of given order.

You are now following this Submission

An implementation of the Markov chain Monte Carlo algorithm for generating random Latin squares of arbitrary order with approximately uniform distribution, proposed by Jacobson & Matthews:
M. Jacobson, P. Matthews, "Generating uniformly distributed random Latin squares", Journal of Combinatorial Designs, vol. 4, no. 6, pp. 405-437, 1996.
This implementation is based on:
I. Gallego Sagastume, "Generation of random latin squares step by step and graphically", XX Congreso Argentino de Ciencias de la Computación, Buenos Aires, 2014.

Cite As

Jakub Wagner (2026). Random Latin square (https://uk.mathworks.com/matlabcentral/fileexchange/79200-random-latin-square), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.2

Added image

1.0.1

Added image

1.0.0