Next: parcellfun_set_nproc, Previous: parcellfun, Up: Local execution [Index]
Evaluates a function for corresponding elements of an array.
Argument and options handling is analogical to parcellfun
, except that
arguments are arrays rather than cells. If cells occur as arguments, they are treated
as arrays of singleton cells.
Arrayfun supports one extra option compared to parcellfun: "Vectorized".
This option must be given together with "ChunksPerProc" and it indicates
that fun is able to operate on vectors rather than just scalars, and returns
a vector. The same must be true for errfunc, if given.
In this case, the array is split into chunks which are then directly served to func
for evaluation, and the results are concatenated to output arrays.
If "CumFunc" is also specified (see parcellfun
), fun is
expected to return the result of the same cumulative operation
instead of vectors.
See also parcellfun, (octave)arrayfun.