help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Excluding elements of a matrix


From: antonio palestrini
Subject: Re: Excluding elements of a matrix
Date: Wed, 20 Dec 2006 01:02:47 +0100

2006/12/19, Joseph Wakeling <joseph.wakeling at webdrake.net>:
Thanks to all for useful replies.

How feasible would it be to implement a simple syntax for something like
this in a future version of Octave, along the lines of,

a(\6)   [i.e. a excluding element 6]

A(:,\[5 7])    [matrix A excluding columns 5 and 7]

... inspired by set notation?

...
If you have to work with this kind of data manipulations the best
thing to do, in my opinion, is to write a function like the following
for the matrix example (the vector one may be constructed analogously)

function B = del_columns(A,q)

incidentally, if you remember to put row vectors in the function
you can use "del_columns" even to delete elements of vectors.
I'm lazy I know :-)

ciao
antonio

--
Prof. Antonio Palestrini
DSGSS - University of Teramo, Italy
e-mail: address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]