Description and DetailedDescription attributes of MATLAB classes
matlab, oop
Solution
Use arguments to the classdef:
classdef (Description='A type of story.',...
DetailedDescription='Once upon a time..') MyFairyTaleClass
Commandline:
>> ?MyFairyTaleClass
ans =
meta.class handle
Package: meta
Properties:
Name: 'MyFairyTaleClass'
Description: 'A type of story.'
DetailedDescription: 'Once upon a time..'
Hidden: 0
Sealed: 0
ConstructOnLoad: 0
HandleCompatible: 0
InferiorClasses: {0x1 cell}
This is an undocumented feature it seems.
Problem
Built-in MATLAB classes have values for a Description and DetailedDescription attribute: ``` >> ?handle ans = meta.class handle Package: meta Properties: Name: 'handle' Description: 'Base class for handle classes' DetailedDescription: '' [snip] ``` Similarly, some methods and properties of built-in classes have the same attributes: ``` >> a = ?containers.Map; >> a.PropertyList(1) ans = meta.property handle Package: meta Properties: Name: 'Count' Description: 'Number of pairs in the collection' DetailedDescription: '' [snip] ``` How can I set these attributes for my classes/methods/properties?