Main Content

displayEmptyObject

Class: matlab.mixin.CustomDisplay
Namespace: matlab.mixin

Display format for empty object arrays

Syntax

displayEmptyObject(obj)

Description

displayEmptyObject(obj) is called by disp when obj is an empty array. An object array is empty if one or more of its dimensions are zero. Override this method to customize the display of an empty object array.

The default display of an empty object consists of a header and a list of property names. The header shows the object's dimensions, and the properties are listed in the order defined in the class definition. displayEmptyObject shows only those properties with GetAccess set to public and Hidden set to false.

An empty object array is not scalar. MATLAB® does not call displayScalarObject on empty arrays regardless of their dimensions.

Input Arguments

expand all

Empty object array to display. The class of obj must be derived from matlab.mixin.CustomDisplay.

Attributes

Accessprotected

To learn about attributes of methods, see Method Attributes.

Examples

For an example of a class that implements displayEmptyObject, see Customize Display of Object Arrays.

Version History

Introduced in R2013b