Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

isobject - Is input MATLAB object

Syntax

tf = isobject(A)

Description

tf = isobject(A) returns true if A is an object of a MATLAB class. Otherwise, it returns false. Handle Graphics objects return false. Use ishghandle to test for Handle Graphics objects.

Examples

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

Determine which objects are instances of MATLAB classes. For example:

h = button([20 20 60 60]);
isobject(h)
ans =
     1
isobject(h.UiHandle)
ans =
     0
 

Use isjava to test for Sun Java objects in MATLAB, where it returns false for MATLAB objects:

isjava(h)
ans =
     0

See Also

class | is* | isa

Tutorials

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS