[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding values that aren't in an array in octave
From: |
Juan Pablo Carbajal |
Subject: |
Re: Finding values that aren't in an array in octave |
Date: |
Sun, 9 Oct 2011 16:44:28 +0200 |
On Sun, Oct 9, 2011 at 4:36 PM, Rick T <address@hidden> wrote:
> a2=[1,2,3,4,5,6,7,8,9,10,11,12,13]
One way to go is
> tf = ismember (a2, a1);
> a3 = a2(! tf)
a3 =
2 3 6 7 9 10 11 12
btw, your a3 was not correct. 13 is in a1 and 2 is missing in a1. :D
--
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/