How I can avoid alphabetical sorting of classdef property list in MATLAB doc?
조회 수: 1 (최근 30일)
이전 댓글 표시
Consider the following simple calssdef:
classdef MSD
% Constructs a mass-spring-damper system.
properties
% object mass in kg.
mass double
% spring stiffness.
stiffness double
% friction coefficient.
damping double
end
methods
% Constructor
function obj = MSD(mass, varargin)
p = inputParser;
p.addRequired('mass');
p.addParameter('stiffness', 0);
p.addParameter('damping', 0);
p.parse(mass, varargin{:});
obj.mass = p.Results.mass;
obj.stiffness = p.Results.stiffness;
obj.damping = p.Results.damping;
end
end
end
The order of property items in Command Window is the same as that in the code i.e.
- mass,
- siffness,
- damping.
>> mass = 10;
>> model = MSD(mass, 'stiffness', 1, 'damping', 2)
model =
MSD with properties:
mass: 10
stiffness: 1
damping: 2
Everything is OK so far. But in MATLAB doc, the property items are sorted in alphabetic order!!!
Is there any way to avoid alphabetic sorting of property items in MATLAB doc?
doc MSD
![Untiatled.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/219014/Untiatled.png)
댓글 수: 0
답변 (1개)
Zenin Easa Panthakkalakath
2019년 5월 14일
Hi Saeid,
Perhaps the following page on displaying custom documentation may be what you are looking for.
Regards,
Zenin
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Software Development Tools에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!