| MATLAB® | ![]() |
tf = isobject(A)
tf = isobject(A) returns logical 1 (true) if A is a MATLAB object and logical 0 (false) otherwise. Note that Handle Graphics objects return false. Use ishandle to test for Handle Graphics
Suppose you define the following MATLAB class:
classdef button < handle
properties
UiHandle
end
methods
function obj = button(pos)
obj.UiHandle = uicontrol('Position',pos,...
'Style','pushbutton');
end
end
end
You can use isobject to determine what objects are instances of MATLAB classes. For example:
h = button([20 20 60 60]);
isobject(h)
ans =
1
isobject(h.UiHandle)
ans =
0Note that isjava, which tests for Sun Java objects in MATLAB, returns false for MATLAB objects:
isjava(h)
ans =
0For more information on MATLAB classes and objects, see: MATLAB Classes Overview.
isjava, isstruct, iscell, ischar, isnumeric, islogical, methods, class, isa, is*
![]() | isnumeric | isocaps | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |