[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More DLD mysteries
From: |
JD Cole |
Subject: |
Re: More DLD mysteries |
Date: |
Tue, 09 Mar 2004 17:09:34 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 |
Al,
At first glance, it looks like an argument gets passed to 'any' or
'all', if you don't want to specify a dimension, pass -1 (see
src/data.cc ANY_ALL macro). They both also reduce the dimensionality by
one, similar to when we do max(max(some_2d_matrix)), so if your mattrix
is 2d, use any/all twice and then use then index the "top-left" item of
the bools matrix returned.
Hope this helps,
JD
Al Niessner wrote:
I am now looking for all() and any(). I have the expression "if any (a <
b)" and "if all (b < a)" type of thing in my m-file. I cannot find an
equivalent function that reduces to a boolean in the header files. I
tried "if (boolMatrix(a < b).any()) but that fails at compilation
because it returns yet another matrix and not a boolean. Any suggestions
are welcome and thanks in advance.
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------