[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to leave out selected elements from a vector?
From: |
Michael Goffioul |
Subject: |
Re: How to leave out selected elements from a vector? |
Date: |
Thu, 17 Jul 2008 12:01:21 +0200 |
On Thu, Jul 17, 2008 at 11:50 AM, Primoz PETERLIN
<address@hidden> wrote:
> Hello,
>
> Even after a couple of months of using Octave, I still consider myself
> a newbie. :)
>
> Here is my question. In Mathematica, there exists a function called
> Drop, which I often use to manipulate lists, e.g., Drop[ list, {m, n}
> ] returns the argument list with the elements m through n omitted from
> the list (the resultant list is shorter for (n - m + 1) elements).
>
> Does anything similar already exist in Octave? I know I can program it
> myself, but I wouldn't want to reinvent the wheel. :)
Use indexing. For instance [list(1:m-1), list(n+1:end)] could do what
you want.
Michael.
- 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 <=
- 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, 2008/07/18
- 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