Jump to content
  • Advertisement

Mantear

Member
  • Content count

    765
  • Joined

  • Last visited

Community Reputation

251 Neutral

About Mantear

  • Rank
    Advanced Member
  1. Mantear

    Matrix inversion

    @ Brother Bob;  I'm sure that's good advice.  The problem is I don't understand enough for it to help me.  I wouldn't know how to properly condition the matrix.  I also do not know how Matlab is coming up with its answer.   @ unbird: I'm looking at your linked article.  My current solution claims to use row-pivoting; I'm going to attempt to better understand pivoting to see if: A) i'm already pivoting and B) if I'm not, if doing so will help.   Thanks.
  2. Mantear

    Matrix inversion

    I'm a linear algebra weakling and am looking for help anywhere I can find it.   I'm attempting to calculate the inverse of a 14x14 square matrix using Gauss-Jordan elimination.  This seems to work for some matrix input, but not all.  I end up with an almost zero value on the diagonal, which really blows up the scaling of the values in the matrix.   I'm comparing my results to those calculated by Matlab.  For my initial set of matricies, the results match (within rounding differences).  But for the following matrix, they do not.  (sorry for the large data set: if there's a better way to show this please let me know).         -10.685512    -1.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000     63.545570    1.000000    -1.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000     -213.193800    0.000000    1.000000    -1.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000     493.092433    0.000000    0.000000    1.000000    -1.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000     -831.846712    0.000000    0.000000    0.000000    1.000000    -1.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000     1055.702065    0.000000    0.000000    0.000000    0.000000    1.000000    -1.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000     -1024.015861    0.000000    0.000000    0.000000    0.000000    0.000000    1.000000    -1.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000     762.935063    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    1.000000    -1.000000    0.000000    0.000000    0.000000    0.000000    0.000000     -434.501577    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    1.000000    -1.000000    0.000000    0.000000    0.000000    0.000000     186.205620    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    1.000000    -1.000000    0.000000    0.000000    0.000000     -58.228421    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    1.000000    -1.000000    0.000000    0.000000     12.560150    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    1.000000    -1.000000    0.000000     -1.672796    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    1.000000    -1.000000     0.103779    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    0.000000    1.000000   Element (14,14) becomes nearly zero [~4.354*10^-12] when eliminating element (14,13) by scaling and subtracting row 13 from row 14.  So when I go to scale row 14 to get the diagonal value to equal 1.0, the scaling just gets huge.  [Note: I'm using long double data types to operate on.] The Matlab result is also a matrix with very large values, but they are quite different than mine.  I'm guess the very small/very large numbers are throwing things off, but I can't tell where.  Is there a different technique I need to employ to get the same answer as Matlab?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!