help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using find function to wrap set functions


From: Martin Helm
Subject: Re: using find function to wrap set functions
Date: Wed, 26 Oct 2011 17:04:27 +0200

Am Mittwoch, den 26.10.2011, 16:45 +0200 schrieb Martin Helm: 
> Am Mittwoch, den 26.10.2011, 16:14 +0200 schrieb Francesco Potortì:
> > find(all(any(aa'==12), any(aa'==54), any(aa'==77)))
> 
> You have a small typo, it should be 
> 
> find(all([any(aa'==12), any(aa'==54), any(aa'==77)]))
> 
> If the rows have only distinct numbers in it the sum solution is about
> two times faster, if not then of course the all/any solution is the way
> to go.
> 

Replacing the transposed matrices
find(all([any(aa==12,2), any(aa==54,2), any(aa==77,2)], 2))
speeds up the solution.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]