root/applications/dual/SIDP/index.m @ 743

Revision 743, 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.