inspect - Open Property Inspector

Syntax

inspect
inspect(h)
inspect([h1,h2,...])

Description

inspect creates a separate Property Inspector window to enable the display and modification of the properties of any object you select in the figure window or Layout Editor. If no object is selected, the Property Inspector is blank.

inspect(h) creates a Property Inspector window for the object whose handle is h.

inspect([h1,h2,...]) displays properties that objects h1 and h2 have in common, or a blank window if there are no such properties; any number of objects can be inspected and edited in this way (for example, handles returned by the bar command).

The Property Inspector has the following behaviors:

The Property Inspector provides two different views:

To view alphabetically, click the "AZ" Icon in the Property Inspector toolbar. To see properties in groups, click

the "++" icon . When properties are grouped, the "-" and "+" icons are enabled; click to expand all categories and click to collapse all categories. You can also expand and collapse individual categories by clicking on the "+" next to the category name. Some properties expand and collapse

Examples

Example 1

Create a surface mesh plot and view its properties with the Property Inspector:

Z = peaks(30);
h = surf(Z)
inspect(h)

Use the Property Inspector to change the FaceAlpha property from 1.0 to 0.4 (equivalent to the command set(h,'FaceAlpha',0.4)). FaceAlpha controls the tranparency of patch faces.

When you press Enter or click a different field, the FaceAlpha property of the surface object is updated:

Example 2

Create a serial port object for COM1 and use the Property Inspector to peruse its properties:

s = serial('COM1');
inspect(s)

Because COM objects do not define property groupings, only the alphabetical list view of their properties is available.

Example 3

Create a COM Excel server and open a Property Inspector window with inspect:

h = actxserver('excel.application');
inspect(h)

Scroll down until you see the CalculationInterruptKey property, which by default is xlAnyKey. Click on the down-arrow in the right margin of the property inspector and select xlEscKey from the drop-down menu, as shown below:

Check this field in the MATLAB command window using get to confirm that it has changed:

get(h,'CalculationInterruptKey')

ans =
xlEscKey

See Also

get, set, isprop, guide, addproperty, deleteproperty

  


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