root/applications/dual/SIDP/transformace/index.m @ 993

Revision 862, 219 bytes (checked in by zimamiro, 15 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.