MathGroup Archive 2011

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

Search the Archive

Re: Set diagonal of square matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116984] Re: Set diagonal of square matrix
  • From: Batracos <giulio.a at gmail.com>
  • Date: Sun, 6 Mar 2011 05:44:45 -0500 (EST)
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

Sure it is. The code

  DiagonalMatrix[{a,b,c}]

produces

  {{a, 0, 0}, {0, b, 0}, {0, 0, c}}.

I hope this is what you are looking for.

Best regards


  • Prev by Date: TreeMap Visualization in Mathematica
  • Next by Date: Re: Set diagonal of square matrix
  • Previous by thread: Re: Set diagonal of square matrix
  • Next by thread: Re: Set diagonal of square matrix