Thread: sorting the matrix question..

  1. #46
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by transgalactic2 View Post
    i will try again
    The error on sorting is fixed by replacing the word "rows", with the word "cols", in the sorting part of the code, at the bottom.

    Go below the sort of the row_sums, to the part where the matrix elements for the row
    are being swapped.

    just remove the word "rows", there, and put in the word "cols".

    for(k = 0; k < rows; k++)

    should be:

    for(k = 0; k < cols; k++)

    That fixes it.

  2. #47
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    thanks it works

  3. #48
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    You're welcome.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. power operation on a matrix question..
    By transgalactic2 in forum C Programming
    Replies: 6
    Last Post: 12-19-2008, 11:11 AM
  2. Music Programming - Serial Matrix Display
    By CrazyHorse in forum C Programming
    Replies: 1
    Last Post: 11-12-2007, 04:16 PM
  3. Replies: 3
    Last Post: 04-29-2005, 02:03 AM
  4. Replies: 21
    Last Post: 04-25-2005, 07:18 PM
  5. an actual question (sorting arrays)
    By master5001 in forum C Programming
    Replies: 4
    Last Post: 08-13-2001, 10:21 PM