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.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.