IonicWind Software

Announcements => User Offerings => Topic started by: danbaron on August 17, 2009, 10:59:36 PM

Title: Timing Matrix Inversions
Post by: danbaron on August 17, 2009, 10:59:36 PM

Hi Gang!

Attached, is an EB console program that uses the Gauss-Jordan method to
invert matrices.

For an N x N matrix, you set the value of the program constant, N.

All of the matrices used in the program are static. Each time you change
the value of N, you must re-compile the program.

When the program executes, the N x N matrix is randomly filled with
DOUBLEs, in the range of (-1000, 1000).

Then, the matrix is inverted.

The time to invert the matrix is calculated, and displayed in the
console window.

After the inversion, a check is made to determine if the inversion is
correct.

Let's call the original matrix, "A", and its inversion, "A'".

After the inversion, we have both A and A', i.e., the inversion does not
overwrite A.

In order to check the inversion, we multiply A and A'. Their product
should be the N x N identity matrix, "I".

We then multiply a vector of length N, with all values set equal to 1, by
the I we calculated.

According to the properties of the identity matrix, the multiplication
should not alter the vector, i.e., every value should still equal 1.

The check vector is written to a text file, so that you can verify that
the inversion worked. If all of the vector's values are very close to 1,
then the inversion is good. The elapsed time is also written to the text
file.

There is a lot of text in the code, that explains the Gauss-Jordan
method, and what is generally going on.

Nuf sed.

DTB.
Title: Re: Timing Matrix Inversions
Post by: LarryMc on August 17, 2009, 11:04:45 PM
Thanks Shemp
;)
Larry
Title: Re: Timing Matrix Inversions
Post by: danbaron on August 17, 2009, 11:17:22 PM

I was going to tell you, that you look like Larry, but I didn't know if I should.

Why don't you grow out your hair?

Shemp   :(  >:(  8)  :)  :D

Title: Re: Timing Matrix Inversions
Post by: LarryMc on August 18, 2009, 04:29:14 AM
My hair only gets all frizzy when Mo slaps me.

Larry

PS we're sort of off topic and its my fault.
Title: Re: Timing Matrix Inversions
Post by: danbaron on August 18, 2009, 02:36:23 PM

I like that picture.

It reminds me of Ricky Nelson.

Ozzie.  :D
Title: Re: Timing Matrix Inversions
Post by: LarryMc on August 18, 2009, 03:59:53 PM
Close to the right time.
I was 17 and a senior in high school.