Is this normal? Should I change all my arrayfun operations to loops?
Yes, it is normal. Change if speed if your priority.
See similar topic on CELLFUN:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/253815
Arrayfun and cellfun essentially are for-loops with extra overhead. Cellfun can be a fast for few cases (see the post above). Things doesn't seem to change with 2009B.
Bruno
So... Why does arrayfun exist at all, then? Are there any advantages?
"Bruno Luong" <b.l...@fogale.findmycountry> wrote in message <h8ddfd$h50$1...@fred.mathworks.com>...
Compactness of the code I guess. We can call it as the input of another function, this is of course not possible with for-loop.
Bruno