FUNCTION REFERENCE

varfun

Apply a function to each table variable.

Apply a function to each table variable.

Syntax

B = varfun(func, T, 'InputVariables', vars, 'GroupingVariables', g, 'OutputFormat', 'table'|'uniform'|'cell')

Results are named <function>_<variable> (Fun_<variable> for anonymous functions). With grouping variables the result has the group values, GroupCount and the result per group.

Example

varfun(@mean, table([1;2], [3;4]))

Differences from MATLAB: No ErrorHandler; grouped results have no row names; 'cell' output only without grouping.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.