Mercurial > hg > ishara
view general/cellutils/cellmap.m @ 38:9d24b616bb06
Added function algebra.
author | samer |
---|---|
date | Tue, 29 Jan 2013 15:59:01 +0000 |
parents | 03694e5c8365 |
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}=fn(X{i}); end