[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to leave out selected elements from a vector?
From: |
Jaroslav Hajek |
Subject: |
Re: How to leave out selected elements from a vector? |
Date: |
Fri, 18 Jul 2008 23:28:47 +0200 |
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.
> Cheers,
> Shaun
>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- How to leave out selected elements from a vector?, Primoz PETERLIN, 2008/07/17
- Re: How to leave out selected elements from a vector?, Michael Goffioul, 2008/07/17
- Re: How to leave out selected elements from a vector?, Francesco Potorti`, 2008/07/17
- Re: How to leave out selected elements from a vector?, Shaun Jackman, 2008/07/18
- Re: How to leave out selected elements from a vector?, Jaroslav Hajek, 2008/07/18
- Re: How to leave out selected elements from a vector?, Shaun Jackman, 2008/07/18
- Re: How to leave out selected elements from a vector?,
Jaroslav Hajek <=
- Re: How to leave out selected elements from a vector?, Ben Abbott, 2008/07/18
- Re: How to leave out selected elements from a vector?, Francesco Potorti`, 2008/07/18