help-octave
[Top][All Lists]
Advanced

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

Re: Filtering


From: Laurent Jacques
Subject: Re: Filtering
Date: Mon, 28 Feb 2005 14:52:53 +0100
User-agent: KMail/1.6.2

On Monday 28 February 2005 14:24, Hamish Allan wrote:
| octave:4> ans2 = [0 1 1 1 1]
| ans2 =
|
|    0  1  1  1  1
|
| octave:5> x(ans2)
| error: invalid vector index = 0
| octave:5>
|
| Why is this? How else might I achieve what I want to do, which is:

I think that this is incorrect too in matlab since the vector used as index 
for an other vector must be boolean.

Try 
        x(ans2 == 1)
and it will possibly work (not tested).

Laurent.




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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