Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

自定义类的对象显示

自定义 MATLAB® 如何在命令行窗口中显示类的对象

CustomDisplay 类定义了一个接口,可以用它来自定义 MATLAB 如何显示对象。有关该接口的综述,请参阅Custom Display Interface。此外,您可以通过 CustomCompactDisplayProvider 类来自定义容器(如结构体和表)中对象的显示。有关该接口的综述,请参阅Custom Compact Display Interface

函数

details显示数组详细信息

matlab.mixin.CustomDisplay用于自定义对象显示的接口
matlab.mixin.util.PropertyGroup用于对象显示的自定义属性列表
matlab.mixin.CustomCompactDisplayProviderInterface for customizing object display within containers (自 R2021b 起)
matlab.display.CompactDisplayRepresentationBase class for representing compact display of object array (自 R2021b 起)
matlab.display.DisplayConfigurationDescribe display environment and settings (自 R2021b 起)
matlab.display.DimensionsAndClassNameRepresentationCompact display representation using dimensions and class name (自 R2021b 起)
matlab.display.PlainTextRepresentationCompact display representation using data in object array (自 R2021b 起)

主题

自定义显示接口类和方法

用于自定义对象显示的特定方法

自定义紧凑显示