Comparing Matrix's C++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blazted
    New Member
    • Mar 2007
    • 17

    Comparing Matrix's C++

    I am trying to find our how I would compare two matrix's.

    I have two matrix and I want to find out if they are equal, less or greater than.

    I created a double loop to loop through and compare an individual element.

    Code:
    for(int row = 0; row < Number; row++)
    {
        for (int col = 0; col < Number; col++)
        {
            if(a.matrix[row][col] == b.matrix[row][col];
        }
    }
    This compares the individual element but how would I compare the entire matrix and determine which one is greater or less?
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    That depends entirely on your criteria for what is greater

    Comment

    Working...