root/applications/dual/SIDP/jednoduchy system/index.m
@
862
Revision 862, 219 bytes (checked in by zimamiro, 15 years ago) |
---|
Rev | Line | |
---|---|---|
[862] | 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.