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