Mercurial > hg > ishara
comparison general/numerical/array/diffdims.m @ 16:db7f4afd27c5
Rearranging numerical toolbox.
author | samer |
---|---|
date | Thu, 17 Jan 2013 13:20:44 +0000 |
parents | general/numerical/diffdims.m@e44f49929e56 |
children |
comparison
equal
deleted
inserted
replaced
15:19ec801ee487 | 16:db7f4afd27c5 |
---|---|
1 function X=diffdims(X,Dims) | |
2 % diffdims - diff along multiple dimensions | |
3 % | |
4 % diffdims :: | |
5 % [D:[[1,E]->natural]] ~'E dimensional array of size D', | |
6 % [[K]->[E]] ~'K dimensions each from 1 to E' | |
7 % -> [DD]. ~'array of diffs, smaller by one in each diffed dim'. | |
8 | |
9 for d=Dims, X=diff(X,1,d); end |