Mercurial > hg > plml
comparison matlab/db/dbcellmap.m @ 36:a1094b51a6c4
Added missing matlab file.
author | samer |
---|---|
date | Thu, 06 Feb 2014 16:26:30 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
35:af5fa681278e | 36:a1094b51a6c4 |
---|---|
1 function Y=cellmap(fn,X) | |
2 % cellmap - Map a function over a cell array | |
3 % | |
4 % cellmap :: (A->B, {[Size]->A}) -> {[Size]->B} | |
5 | |
6 % preallocate to fix size | |
7 Y=cell(size(X)); | |
8 for i=1:numel(X) | |
9 Y{i}=feval(fn,X{i}); | |
10 end |