Mercurial > hg > ishara
annotate general/cellutils/cellmap.m @ 7:47cb292350f3
Some documentation fixes.
author | samer |
---|---|
date | Mon, 14 Jan 2013 14:52:38 +0000 |
parents | e44f49929e56 |
children | 03694e5c8365 |
rev | line source |
---|---|
samer@4 | 1 function Y=cellmap(fn,X) |
samer@4 | 2 % cellmap - Map a function over a cell array |
samer@4 | 3 % |
samer@4 | 4 % cellmap :: (A->B, {[Size]->A}) -> {[Size]->B} |
samer@4 | 5 |
samer@4 | 6 % preallocate to fix size |
samer@4 | 7 Y=cell(size(X)); |
samer@4 | 8 for i=1:numel(X) |
samer@7 | 9 Y{i}=fn(X{i}); |
samer@4 | 10 end |