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: Joan Picanyol i Puig
Subject: Re: Excluding elements of a matrix
Date: Tue, 26 Dec 2006 04:10:29 +0100
User-agent: Mutt/1.5.11

[someone broke the thread, I'm just answering the OP]

* Joseph Wakeling <address@hidden> [20061219 16:24]:
> Is there a convenient notation for excluding elements of a vector or
> matrix?

Last week I found complement():

octave-2.1.73:14> a = reshape (linspace (1, 12, 12), 3, 4)
a =

   1   4   7  10
   2   5   8  11
   3   6   9  12

octave-2.1.73:15> a(:, complement ([1 3], 1:size (a, 2)))
ans =

   4  10
   5  11
   6  12

Octave 2.1.73; octave-forge-2006.03.17

HTH
--
pica


reply via email to

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