TF = contains(R,xWorld,yWorld)
returns a logical array TF. Each element
TF(k) is true if and only if the
corresponding point
(xWorld(k),yWorld(k))
falls within the bounds of an image associated with 2-D spatial referencing
object R.
TF = contains(R,xWorld,yWorld,zWorld)
indicates whether each point falls within the bounds of an image associated with
3-D spatial referencing object R.
Check if certain world coordinates are in the image.
res = contains(R,[5 8 8],[5 10 257])
res = 1×3 logical array
1 1 0
This result indicates that the points (5,5) and (8,10) are within the image bounds, and that the point (8, 257) is outside the image bounds. This conclusion is consistent with the XWorldLimits and YWorldLimits properties of the spatial referencing object R.
This result indicates that the points (5,5,1) and (6,10,27.5) are within the image bounds. The points (6,10,28) and (8,257,1) are outside the image bounds. This conclusion is consistent with the XWorldLimits, YWorldLimits, and ZWorldLimits properties of the spatial referencing object R.
Coordinates along the z-dimension in the world
coordinate system, specified as a numeric scalar or vector.
zWorld is the same length as
xWorld and yWorld.
Flag indicating whether coordinates exist within the bounds of the image,
returned as a logical scalar or vector. TF is the same
length as the input coordinate vectors xWorld,
yWorld, and (when relevant)
zWorld.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.