help-octave
[Top][All Lists]
Advanced

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

Re: conditional expr operator in Octave?


From: John W. Eaton
Subject: Re: conditional expr operator in Octave?
Date: Thu, 30 Jul 2009 14:49:20 -0400

On 30-Jul-2009, Jaroslav Hajek wrote:

| OK, I'm dropping it; instead, I implemented the "merge" function aka
| Fortran 90 (which I needed for some time) and slightly extended the
| scalar mask case to allow arbitrary (even non-array) values.
| http://hg.savannah.gnu.org/hgweb/octave/rev/833109a9f37f
| 
| merge (mask, tval, fval)
| can now be used instead of mask ? tval : fval (except that it does not
| short-circuit).

The name "merge" doesn't seem very intuitive to me.  What about using
"ifelse" instead?

jwe


reply via email to

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