[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Excluding elements of a matrix

**From**: |
Joseph Wakeling |

**Subject**: |
Re: Excluding elements of a matrix |

**Date**: |
Tue, 19 Dec 2006 18:08:27 +0100 |

**User-agent**: |
Thunderbird 1.5.0.8 (X11/20061115) |

Bill Denney wrote:
>* You can do something like*
>* *
>* a = 1:10;*
>* b = a([1:5 7:10])*
Sure; this is selectively _including_ elements of a vector/matrix (in
this case, elements 1-5 and 7-10). I was wondering if there's a
comparably simple notation for _excluding_ elements.
The reason I ask is that, for example, if I want to remove element k
from a given vector, there are special cases. I can't just write,
a = a([1:(k-1) (k+1):columns(a)])
because obviously I might have k=1 or k=columns(a).
It would simplify things a lot if instead of having to write extra lines
to take into account these special cases, there were a notation giving
"everything but element k".

**autocorrelation**, *Francesco Potorti`*, `2006/12/18`
**Re: autocorrelation**, *Paul Kienzle*, `2006/12/18`
**Excluding elements of a matrix**, *Joseph Wakeling*, `2006/12/19`
**Re: Excluding elements of a matrix**, *Bill Denney*, `2006/12/19`
**Re: Excluding elements of a matrix**, *Jordi Gutierrez Hermoso*, `2006/12/19`
**Re: Excluding elements of a matrix**, *Francesco Potorti`*, `2006/12/19`
**Re: Excluding elements of a matrix**, *Quentin Spencer*, `2006/12/19`
**Re: Excluding elements of a matrix**, *Joseph Wakeling*, `2006/12/19`
**Re: Excluding elements of a matrix**, *antonio palestrini*, `2006/12/19`
**Re: Excluding elements of a matrix**, *Jordi Gutierrez Hermoso*, `2006/12/19`
**Re: Excluding elements of a matrix**, *John W. Eaton*, `2006/12/19`