Next: Special Utility Matrices, Previous: Rearranging Matrices, Up: Matrix Manipulation

### 17.3 Applying a Function to an Array

— Function File: a = arrayfun (name, c)
— Function File: a = arrayfun (func, c)
— Function File: a = arrayfun (func, c, d)
— Function File: a = arrayfun (func, c, options)
— Function File: [a, b, ...] = arrayfun (func, c, ...)

> Execute a function on each element of an array. This is useful for functions that do not accept array arguments. If the function does accept array arguments it is better to call the function directly.

> See `cellfun` for complete usage instructions.

> See also: cellfun.