# HG changeset patch # User samer # Date 1391703990 0 # Node ID a1094b51a6c4e747718121dfc21df18b3950bd3a # Parent af5fa681278e451ed3690e90652fb4dd102a08d8 Added missing matlab file. diff -r af5fa681278e -r a1094b51a6c4 matlab/db/dbcellmap.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/db/dbcellmap.m Thu Feb 06 16:26:30 2014 +0000 @@ -0,0 +1,10 @@ +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