0

How can I find the differences between two matrix? I should find the diverse numbers.
Thanks in advance for your help!

5
Contributors
5
Replies
7
Views
4 Years
Discussion Span
Last Post by WaltP
Featured Replies
  • 1
    WaltP 2,905   4 Years Ago

    If people would stop responding to these posts, we could actually do something about them. Read More

0

I find it funny how you are just spam posting really short questions and not really going into any detail. No one will help you if you don't do a bit of work and show us that you have done a bit of research on your end.

0

Couldn't you just compare it like they're just two arrays.. but with an extra for?

I mean, if I give you two pieces of paper with a matrix on each of them, that's the way your
brain would do it. Here's some pseudocode, because if I were to give you real code, you would just copy it and learn nothing.

flag = 1
for i = 1 to i <= n
    for j = 1 to j <= m
        if m1[i][j] is not equal to m2[i][j]
            flag = 0
            break
    if flag is equal to 0
        break
if flag is equal to 1
    etc...

Let's hope you'll actually code this.

0

Just replace the '+' sign in the addition logic of "Addition of matrices" program with '-'
we don't provide ready made codes.. Hope you know the addition of matrix program!

0

Just replace the '+' sign in the addition logic of "Addition of matrices" program with '-'
we don't provide ready made codes.. Hope you know the addition of matrix program!

I think when he is saying "difference" he wants to compare them. What you're suggesting could also do that ( if(m1[i][j]-m2[i][j])==0 ), but it would also be a tad more counterintuitive...

1

If people would stop responding to these posts, we could actually do something about them.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.