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