Magic
Create magic square matrix
Syntax
magic(n) |
n is positive integer |
Return an n-by-n matrix constructed from the integers 1 through n^2 with equal row and column sums. The order n must be a scalar greater than or equal to 3. |
Examples
Input |
Output |
magic(5) |
Created with the Personal Edition of HelpNDoc: Free PDF documentation generator