Main Content

iscom

Determine whether input is COM object

Description

example

tf = iscom(c) returns logical 1 (true) if c is a COM object. Otherwise, it returns logical 0 (false).

Examples

collapse all

Test an instance of a Microsoft® Excel® application. MATLAB® displays true, indicating that the Excel application is a COM object.

app = actxserver('Excel.Application');
iscom(app)

Create a workbooks object and test. MATLAB displays false, indicating that a workbook is not a COM object.

w = get(app,'workbooks');
iscom(w)

Input Arguments

collapse all

COM object, specified as a function handle.

Limitations

  • COM functions are available on Microsoft Windows® systems only.

Extended Capabilities

Version History

Introduced before R2006a