[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comparing two matrices
From: |
Francesco Cat |
Subject: |
Re: comparing two matrices |
Date: |
Tue, 22 Jul 2008 10:00:32 +0200 |
I would do it by:
Diff = !(A == B)
but be carefull because you must use integers or the floating point
precision could easily create false positives
2008/7/22 Goebel, Juergen <address@hidden>:
> Hi,
>
> I'd like to compare two row (or column) matrices
> and get a resulting matrix in which the different
> positions are marked by a one, e.g.
>
> A = [0 1 2 3 0 1 2 3]
> B = [0 0 2 3 0 1 2 2]
>
> result: [0 1 0 0 0 0 0 1]
>
> How do I achieve this? (I already played a bit
> with the find-function but without success.)
>
> Regards,
>
> Juergen
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
>