5.0

5.0 | 1 rating Rate this file 93 downloads (last 30 days) File Size: 2 KB File ID: #9996

BALLATSQ

by Jos (10584)

 

15 Feb 2006 (Updated 26 Mar 2009)

Code covered by BSD License  

Create a balanced latin square (v2.2, mar 2009)

Download Now | Watch this File

File Information
Description

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.

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
18 Feb 2006 John D'Errico

Nice help, checks for errors, works, etc.

12 Apr 2006 Jos vdG

There is a problem for certain sizes. Update is on its way.
Jos (the author)

19 Sep 2006 Jos (author)

Update on sep 19, 2006: added randomization

Please login to add a comment or rating.
Updates
13 Apr 2006

improved algorithm

18 Sep 2006

added randomization
modified help

26 Mar 2009

better comments and randomization

Tag Activity for this File
Tag Applied By Date/Time
statistics Jos (10584) 22 Oct 2008 08:15:50
probability Jos (10584) 22 Oct 2008 08:15:50
matrix Cristina McIntire 05 Feb 2009 14:35:01
balanced latin Cristina McIntire 05 Feb 2009 14:35:01
design Cristina McIntire 05 Feb 2009 14:35:01
experiment Cristina McIntire 05 Feb 2009 14:35:01
special Cristina McIntire 05 Feb 2009 14:35:01
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com