MathGroup Archive 2011

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

Search the Archive

Set diagonal of square matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116934] Set diagonal of square matrix
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Sat, 5 Mar 2011 06:04:40 -0500 (EST)

Dear MathGroup members,

Is there any simple way to set the diagonal of a square matrix to a
vector (of appropriate length)?  Of course there are ways to do it,
but I was wondering if there was a simple, one-line way.


  • Prev by Date: case sensitive auto-completion in Mathematica 8?
  • Next by Date: Plotting singularities
  • Previous by thread: Re: case sensitive auto-completion in Mathematica 8?
  • Next by thread: Re: Set diagonal of square matrix