MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Magic Matrices

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32507] Magic Matrices
  • From: "Flip Flippy" <flip at safebunch.com>
  • Date: Thu, 24 Jan 2002 05:21:01 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi All,

does anyone know of code for Mathematica to produce magic matrices?

For example Magic[n] would produce an nxn matrix where all of the 
row, column and diagonal sums are equal.

As an example:

Magic[3] would produce as output:

{{8,1,6},{3,5,7},{4,9,2}}.


Thank you for any inputs, Flip


-- 
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG


  • Prev by Date: Intersection Ellipse & Circle
  • Next by Date: Difference between Get[] and Copy-Past operation
  • Previous by thread: Re: Intersection Ellipse & Circle
  • Next by thread: Re: Magic Matrices