On Fri, Jul 18, 2008 at 11:17 PM, Shaun Jackman <address@hidden>
wrote:
Jaroslav Hajek wrote:
On Fri, Jul 18, 2008 at 7:07 PM, Shaun Jackman <address@hidden>
wrote:
Bill Denney wrote:
...
or with a logical vector
mask = false(size(list));
mask(m:n) = true;
list(mask)
Woah! This blows my mind. How does a logical vector differ from a
vector
of
integers? Example:
Indexing by a boolean vector b is essentially the same as indexing
by find
(b).
How does octave know that the vector is of booleans and not
integers? Where
is this type information stored, and how do I display it?
Each high-level (i.e. not internal) value in Octave has type
information associated with it. You can use "class" and "typeinfo" to
inquire about the type.