comparing two matrices

bharat pathak bharat at arithos.com
Tue Jul 22 02:57:48 CDT 2008


comparing two matricesthis can be done by

C = ~(A == B)

regards,
bharat pathak

Arithos Designs
www.Arithos.com





From: Goebel, Juergen 
Sent: Tuesday, July 22, 2008 1:02 PM
To: Octave-ML 
Subject: comparing two matrices


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 

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.5.3/1565 - Release Date: 21-07-2008 18:36


--------------------------------------------------------------------------------


_______________________________________________
Help-octave mailing list
Help-octave at octave.org
https://www.cae.wisc.edu/mailman/listinfo/help-octave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/help-octave/attachments/20080722/b85621da/attachment.html 


More information about the Help-octave mailing list