[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: if-tests being ignored?
From: |
Matthew Tylee Atkinson |
Subject: |
Re: if-tests being ignored? |
Date: |
Sat, 12 Jan 2008 00:29:10 +0000 |
On Sat, 2008-01-05 at 00:10 +0100, Søren Hauberg wrote:
> Hi,
> and welcome to Octave :-) Replies are below...
>
. . .
> function retval = test(x)
> retval = 0 * x;
> retval(x<6) = 3/4 * x(x<6);
> retval(x<3) = 1/4 * x(x<3);
> endfunction
>
> At first, this code might seem a bit odd, but you'll get used to the way
> of thinking, and then you'll love it :-)
Sorry for the delay in replying and thank you very much for your
detailed reply. It has helped considerably!
best regards,
--
Matthew Tylee Atkinson <address@hidden>