iscom

Determine whether input is COM or ActiveX object

Syntax

tf = iscom(c)

Description

example

tf = iscom(c) returns logical 1 (true) if c is a COM or Microsoft® ActiveX® 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.

Introduced before R2006a