MAT M=#MAGIC(m) creates an m*m magic square matrix M of integers 1,2,...,m^2 where all column and row sums as well as the diagonal and skew diagonal sums are the same i.e. equal to m*(m^2+1)/2. The dimension m must be greater than 2. A = More about additional MAT #operations M = More about MAT operations