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

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.

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.

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!

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...

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.