sorting the matrix question..

This is a discussion on sorting the matrix question.. within the C Programming forums, part of the General Programming Boards category; Originally Posted by transgalactic2 i will try again The error on sorting is fixed by replacing the word "rows", with ...

  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.

Page 4 of 4 FirstFirst 1234
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, 10:11 AM
  2. Music Programming - Serial Matrix Display
    By CrazyHorse in forum C Programming
    Replies: 1
    Last Post: 11-12-2007, 03: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21