fn_map

Contents

Syntax

B = fn_map(fun,A[,'columns|rows'][,'array|cell|arraydirect'][,errorval])
B = fn_map(A,fun,...)

Description

map function 'fun' to elements [default] / columns / rows of A
output an array or a cell array depending on the flag; if no flag is
specified, output a vector if all returned values are scalar, a cell
otherwise; 'arraydirect' flag indicates that all values are expected to
be scalar, therefore no cell array is created, which saves the time of
calling cell2mat function
if errorval is specified, errors are caught and the value errorval is
returned in case of an error
See also fn_isemptyc, fn_itemlengths, fn_find

Source

Thomas Deneux

Copyright 2006-2017