Is it possible to use "if" in arrayfun like the following in Octave?
a = [ 1 2; 3 4];
arrayfun(@(x) if x>=2 1 else 0 end, a)
And Octave complains:
>>> arrayfun(@(x) if x>=2 1 else 0 end, a)
^
Is if clause allowed in arrayfun?