Solving system of equations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eriku
    New Member
    • Jun 2007
    • 5

    Solving system of equations

    I need to solve a system of eq:s with 6 unknown on line (in a trim routine for a simulation model). Do you happen to know where I can find a good function that does that?
    / Erik
  • bonski
    New Member
    • Jun 2007
    • 53

    #2
    Originally posted by eriku
    I need to solve a system of eq:s with 6 unknown on line (in a trim routine for a simulation model). Do you happen to know where I can find a good function that does that?
    / Erik
    hello erik,

    what equation? can you show us what's the formula?

    ^__^

    Comment

    • eriku
      New Member
      • Jun 2007
      • 5

      #3
      Originally posted by bonski
      hello erik,

      what equation? can you show us what's the formula?

      ^__^

      A linear system of eq:s, i.e.
      Ax + b=0
      where A is a n*n matrix, x is a n-dimensional vector of unknown and b is a n-dim. constant vector.
      n=6 in the actual case, could be 7 or more tomorrow.

      A mathematics library in PHP (something like LAPACK in Fortran) is too much to wish for, but maybe someone has translated something ...?

      / Erik

      Comment

      • bonski
        New Member
        • Jun 2007
        • 53

        #4
        Originally posted by eriku
        A linear system of eq:s, i.e.
        Ax + b=0
        where A is a n*n matrix, x is a n-dimensional vector of unknown and b is a n-dim. constant vector.
        n=6 in the actual case, could be 7 or more tomorrow.

        A mathematics library in PHP (something like LAPACK in Fortran) is too much to wish for, but maybe someone has translated something ...?

        / Erik
        ok.. im not really sure bout this.. but i'll try to interpret if it is correct..

        Ax + b = 0;

        A = n * n;
        and the value of n = 6; right? what do you mean 'could be 7 or more tomorrow'?

        x = ?;
        and
        b = n; b is n-dim so b has to be equal to n, is that right?

        think i had to review math first.. hahaha.. i think all we need about this are values.. then you can get the unknown.. hmmmm

        Comment

        • eriku
          New Member
          • Jun 2007
          • 5

          #5
          Originally posted by bonski
          ok.. im not really sure bout this.. but i'll try to interpret if it is correct..

          Ax + b = 0;

          A = n * n;
          and the value of n = 6; right? what do you mean 'could be 7 or more tomorrow'?

          x = ?;
          and
          b = n; b is n-dim so b has to be equal to n, is that right?

          think i had to review math first.. hahaha.. i think all we need about this are values.. then you can get the unknown.. hmmmm

          No, A is a matrix with 6 rows and 6 columns!
          / Erik

          Comment

          • shoonya
            New Member
            • May 2007
            • 160

            #6
            i can recall cramer's rule and similar methods to solve these equations

            shoonya

            Comment

            • shoonya
              New Member
              • May 2007
              • 160

              #7

              i got the link
              i guess coding it wont be a problem for you

              shoonya

              Comment

              • eriku
                New Member
                • Jun 2007
                • 5

                #8
                Originally posted by shoonya
                http://www.purplemath.com/modules/cramers.htm
                i got the link
                i guess coding it wont be a problem for you

                shoonya

                Thank you shoonya!
                A generalisation like expanding to 6*6 or more is not quite trivial, so I was (still am) hoping to find something already tested and cleared. But if nothing turns up, I guess I have to go the hard way via Cramer's rule. Or maybe translate some suitable routines from LAPACK (probably better).

                / Erik

                Comment

                • shoonya
                  New Member
                  • May 2007
                  • 160

                  #9
                  what is this LAPACK ?

                  shoonya

                  Comment

                  • eriku
                    New Member
                    • Jun 2007
                    • 5

                    #10
                    Originally posted by shoonya
                    what is this LAPACK ?

                    shoonya


                    http://www.netlib.org/lapack/index.html
                    / Erik

                    Comment

                    Working...