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.
- Follow-Ups:
- Re: Set diagonal of square matrix
- From: Oliver Ruebenkoenig <ruebenko@wolfram.com>
- Re: Set diagonal of square matrix