nrep = 1e3;

## Load same test variable for repeatability 
load cellfun.var;

## Call function once so all m-files necessary are parsed.
## Otherwise, first time through loop will be slower than others.
cellfun ('numel', aa);

bm1 = zeros (nrep, 1);
for j = 1 : nrep
  tic;
  cellfun ('numel', aa);
  bm1(j) = toc;
end
fprintf ('cellfun(''numel''): %g secs\n', sum (bm1));

bm2 = zeros (nrep, 1);
for j = 1 : nrep
  tic;
  cellfun(@numel, aa);
  bm2(j) = toc;
end
fprintf('cellfun(@numel):  %g secs\n', sum (bm2));
