mm_cond() -- Matrix version of the conditional operator
transmorphic matrix mm_cond(a, b, c)
where a is a real matrix and b and c are matrices of any type (as long as their types are the same).
mm_cond() is a matrix version of the scalar conditional operator (see [M-2] op_conditional).
When a, b, and c are not scalar, mm_cond() returns element-by-element results. a, b, and c are required to be r-conformable (see [M-6] glossary).
The arguments have to be r-conformable (see help [M-6] glossary). Returned is a matrix of max(argument rows) rows and max(argument columns) columns containing element-by-element calculated results.
Ben Jann, ETH Zurich, firstname.lastname@example.org
Thanks to Kit Baum for proposing such a function.