Mercurial > hg > plml
view matlab/general/cellmap.m @ 1:4d183f2855c2
Fixed version number in header
author | samer |
---|---|
date | Fri, 13 Jan 2012 15:32:54 +0000 |
parents | 0dd31a8c66bd |
children |
line wrap: on
line source
function Y=cellmap(fn,X) % cellmap - Map a function over a cell array % % cellmap :: (A->B, {[Size]->A}) -> {[Size]->B} % preallocate to fix size Y=cell(size(X)); for i=1:numel(X) Y{i}=feval(fn,X{i}); end