ifelse
- :
m =ifelse(mask, tval, fval)¶ Select between tval and fval according to mask.
Octave-compatible public name wrapping
__ifelse__(alias of__merge__). A scalar mask returns one of the two values unchanged; an array mask picks tval where true and fval elsewhere.Clean-room Octave-compat helper. MATLAB-valid % comments so the file parses under MATLAB-strict user addpath as well as under the shipped scripts tree. MATLAB has no
ifelse. The Octave synonymmergeis intentionally not shipped as a core public name here: MATLAB and several Nexus toolboxes already usemergefor other APIs. Octave-ported code should callifelse.