BALLATSQ

Create a balanced latin square (v2.2, mar 2009)
2.9K Downloads
Updated Thu, 26 Mar 2009 07:34:52 +0000

View License

BALLATSQ - Balanced Latin Square
M = BALLATSQ(N) creates a balanced latin square of size N containing the numbers 1 to N. N should be an even positive integer.

A latin square of size M is a MxM matrix filled with the M different numbers in such a way that each number occurs exactly once in each row and exactly once in each column. A balanced latin square has the further restriction that each sequence of two values in a row does not occur more than once in the whole matrix. They have applications in the design of experiments.

Cite As

Jos (10584) (2024). BALLATSQ (https://www.mathworks.com/matlabcentral/fileexchange/9996-ballatsq), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.2.0.0

better comments and randomization

1.0.0.0

added randomization
modified help