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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.