Main Content

Convert world coordinates to row and column subscripts

`[`

maps points from the 2-D world system
(`I`

, `J`

] = worldToSubscript(`R`

,`xWorld`

,`yWorld`

)`xWorld`

,`yWorld`

) to subscript
arrays `I`

and `J`

based on the
relationship defined by 2-D spatial referencing object
`R`

.

If the *k*th input coordinates
(`xWorld`

(*k*),`yWorld`

(*k*))
fall outside the image bounds in the world coordinate system,
`worldToSubscript`

sets the corresponding subscripts
`I`

(*k*) and
`J`

(*k*) to
`NaN`

.