tf = isgraphics(H) returns
true for elements of
H that are valid graphics objects and false where elements are not valid graphics objects or are graphics
objects that have been deleted.
tf = isgraphics(H,type)
returns true for elements of
H that are valid graphics objects of the type specified by
the type argument. An object type is the value contained in the
object’s Type property.
Result, returned as a logical array. Values of 1
indicate elements of the input array that are valid, and values of
0 indicate elements that are invalid. The result is
an empty array when the input array is empty.
Passing an array that has three or more dimensions as input returns an array of
the same size. Previously, isgraphics returned a 2-D array when
the input had three or more dimensions. The higher dimensions were collapsed into
the second dimension. For example, if the input was a 2-by-4-by-5 array, the output
was a 2-by-20 array.
If you pass a scalar, 1-D, or 2-D array to either function, the output is the same
size as in previous releases.
If you use nested calls to the all or any function, update your code to
use the "all" argument instead of the nested function call to
preserve the shape of the output.
For example, this code returns a scalar logical value in R2024a. In R2024b, it
returns a 1-by-1-by-4 array of logical values.
h = gobjects(2,3,4);
all(all(isgraphics(h)))
To preserve the scalar output, call the all function once
with the "all" argument. The result is a scalar logical
value.
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.