root/applications/dual/SIDP/Kopie (2) - finalni implementace/index.m @ 1183

Revision 1113, 219 bytes (checked in by zimamiro, 14 years ago)
Line 
1function index=index(position,n_grid,axis)
2%OK
3%returns index in direction of selected axes of point at selected position
4index=mod(-floor(-position/n_grid^(axis-1)),n_grid);
5if index==0
6    index=n_grid;
7end
8end
Note: See TracBrowser for help on using the browser.