Prev: counting object
Next: how to find gradient image...
From: Bi on 16 Apr 2010 22:44 Hello Guys, I have an array e.g, [1 10 20 18 10 9 15 2 1 18] (generated by uniform distribution unidrnd) Is there anyway to find indexes of elements that are not repeated in the array, that say 3, 6, 7, 8 ? Thanks a lot in advanced!
From: dpb on 17 Apr 2010 00:37 Bi wrote: > Hello Guys, > I have an array e.g, [1 10 20 18 10 9 15 2 1 18] (generated by uniform > distribution unidrnd) > Is there anyway to find indexes of elements that are not repeated in the > array, that say 3, 6, 7, 8 ? > > Thanks a lot in advanced! doc unique --
From: Bruno Luong on 17 Apr 2010 02:45 "Bi " <chuyenbk2002ster(a)gmail.com> wrote in message <hqb79n$53t$1(a)fred.mathworks.com>... > Hello Guys, > I have an array e.g, [1 10 20 18 10 9 15 2 1 18] (generated by uniform distribution unidrnd) > Is there anyway to find indexes of elements that are not repeated in the array, that say 3, 6, 7, 8 ? a= [1 10 20 18 10 9 15 2 1 18] [u I J]=unique(a(:)); I(accumarray(J,1)==1) % sort() it if you prefer % Bruno
From: us on 17 Apr 2010 04:29 "Bi " <chuyenbk2002ster(a)gmail.com> wrote in message <hqb79n$53t$1(a)fred.mathworks.com>... > Hello Guys, > I have an array e.g, [1 10 20 18 10 9 15 2 1 18] (generated by uniform distribution unidrnd) > Is there anyway to find indexes of elements that are not repeated in the array, that say 3, 6, 7, 8 ? > > Thanks a lot in advanced! a hint: help unique; us
|
Pages: 1 Prev: counting object Next: how to find gradient image... |