magic
Magic square
📝 Syntaxe
M = magic(N)
📥 Argument d'entrée
N - Matrix order, specified as a scalar integer.
📤 Argument de sortie
M - result of magic function.
📄 Description
M = magic(N) computes an square matrix constructed as an arrangement of the 1:n^2 such that the row sums, column sums, and diagonal sums are all equal to the same value.
💡 Exemple
M = magic(3)🔗 Voir aussi
ones.
🕔 Historique
Version
📄 Description
1.0.0
version initiale
Last updated
Was this helpful?