
Is there an easier way to concert a Rectangular Matrix that has the same number of Rows and Columns into a SquareMatrix so I can Calculate the inverse of the Matrix.
Example
Square = Rectangular.Transpose()*Rectangular;
Inverse=Square.Inverse()


Coordinator
Aug 22, 2012 at 8:49 PM

The latest checkin contains an explicit cast to allow this.
// get a rectangular matrix somehow
RectangularMatrix R;
// if the rectangular matrix happens to be square, this will succeed
// if not, it will throw an InvalidCastException
SquareMatrix S = (SquareMatrix) R;
// note that S is not independent of R; they refer to the same
// matrix storage, so changes to S will change R and vice versa
This is not in the 2.0 release, so for now you will need to recompile Meta.Numerics from source to get it. It will be in the 2.1 release.



Thank you!
From: [email removed]
Sent: Thursday, August 23, 2012 4:10 PM
To: [email removed]
Subject: Re: Converting a Rectangular Matrix into a Square Matrix [metanumerics:358494]
From: ichbin
The latest checkin contains an explicit cast to allow this.
// get a rectangular matrix somehow
RectangularMatrix R;
// if the rectangular matrix happens to be square, this will succeed
// if not, it will throw an InvalidCastException
SquareMatrix S = (SquareMatrix) R;
// note that S is not independent of R; they refer to the same
// matrix storage, so changes to S will change R and vice versa
This is not in the 2.0 release, so for now you will need to recompile Meta.Numerics from source to get it. It will be in the 2.1 release.

