Results 1 to 4 of 4

Math Help - Help with programming matrix in pascal

  1. #1
    Newbie
    Joined
    Jul 2008
    Posts
    2

    Help with programming matrix in pascal

    I'm doing project, and it's point is solving system of linear equations so I need some method to solve them.Unfortunantly, I'm not good at solving it on the paper, especially not know how to write a code for it...Which is the easiest way to do that, and if possible, could someone tell me where can I find a code ?Since, it's not a point of the project(it's educational), and I thought of using matrix...
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor Mathstud28's Avatar
    Joined
    Mar 2008
    From
    Pennsylvania
    Posts
    3,641
    Quote Originally Posted by Natty_Dread View Post
    I'm doing project, and it's point is solving system of linear equations so I need some method to solve them.Unfortunantly, I'm not good at solving it on the paper, especially not know how to write a code for it...Which is the easiest way to do that, and if possible, could someone tell me where can I find a code ?Since, it's not a point of the project(it's educational), and I thought of using matrix...
    Do you know Cramer's Method?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by Natty_Dread View Post
    I'm doing project, and it's point is solving system of linear equations so I need some method to solve them.Unfortunantly, I'm not good at solving it on the paper, especially not know how to write a code for it...Which is the easiest way to do that, and if possible, could someone tell me where can I find a code ?Since, it's not a point of the project(it's educational), and I thought of using matrix...
    Given a system of linear equations. The ultimate way to solve this system is to use Gaussian-Jordan elimination. With this method you do not have to worry if the system is consistent or indepentent, whether it has infinitely many solutions or whether it has no solutions at all. You can have more equations than variables and you can have more variables than equations. There is no limitation on this method. It is absolute, it can solve anyting. It might not seem as elegant as Cramer's method but it is a lot faster in computability speed.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jul 2008
    Posts
    2
    Hm, I don't know....What do you suggest me?
    BTW, this is the pseudocode for the whole procedure ?

    Code:
    i := 1
    j := 1
    while (i ≤ m and j ≤ n) do
      Find pivot in column j, starting in row i:
      maxi := i
      for k := i+1 to m do
        if abs(A[k,j]) > abs(A[maxi,j]) then
          maxi := k
        end if
      end for
      if A[maxi,j] ≠ 0 then
        swap rows i and maxi, but do not change the value of i
        Now A[i,j] will contain the old value of A[maxi,j].
        divide each entry in row i by A[i,j]
        Now A[i,j] will have the value 1.
        for u := i+1 to m do
          subtract A[u,j] * row i from row u
          Now A[u,j] will be 0, since A[u,j] - A[i,j] * A[u,j] = A[u,j] - 1 * A[u,j] = 0.
        end for
        i := i + 1
      end if
      j := j + 1
    end while
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Umbral calculus/Pascal's Matrix
    Posted in the Advanced Math Topics Forum
    Replies: 0
    Last Post: July 2nd 2011, 06:11 AM
  2. Pascal
    Posted in the Calculus Forum
    Replies: 1
    Last Post: May 28th 2009, 05:19 PM
  3. Replies: 1
    Last Post: November 17th 2008, 03:18 AM
  4. Pascal's triangle
    Posted in the Math Topics Forum
    Replies: 1
    Last Post: June 4th 2008, 09:37 PM
  5. Pascal's theorem
    Posted in the Algebra Forum
    Replies: 7
    Last Post: March 23rd 2007, 11:42 PM

Search Tags


/mathhelpforum @mathhelpforum