annotate matlab/db/dbcellmap.m @ 36:a1094b51a6c4

Added missing matlab file.
author samer
date Thu, 06 Feb 2014 16:26:30 +0000
parents
children
rev   line source
samer@36 1 function Y=cellmap(fn,X)
samer@36 2 % cellmap - Map a function over a cell array
samer@36 3 %
samer@36 4 % cellmap :: (A->B, {[Size]->A}) -> {[Size]->B}
samer@36 5
samer@36 6 % preallocate to fix size
samer@36 7 Y=cell(size(X));
samer@36 8 for i=1:numel(X)
samer@36 9 Y{i}=feval(fn,X{i});
samer@36 10 end