%% Apply Function to Contents of Cell Array
% Create a cell array that contains numeric arrays of different sizes.

C = {1:10, [2; 4; 6], []}

%
% Calculate the mean of each numeric array, and return the means in an array.

A = cellfun(@mean,C)

% Copyright 2012 The MathWorks, Inc.