Help text

IDLAYOUT-15
TitleWrite header comments providing user documentation.
PriorityRecommended
Severity level7
DescriptionWrite header comments with text markup to provide user documentation useful both in-file and when using the help and lookfor functions. Optionally add syntax and see also sections.
RationaleThis increases readability, and makes the code more likely to be found and less likely to be reinvented.

Avoid:

function [avg, maxSize] = measureSize(obj, dim)
avg = mean(obj.Size, dim);
maxSize = max(obj.Size, dim);
end

Instead use:

function [avg, maxSize] = measureSize(obj, dim)
%MEASURESIZE Computes the size of the Item object.
%
% Input:
%   obj         The Item object.
%   dim         Dimension to measure.
%
% Output:
%   avg         Average size of the item.
%   maxSize     Maximum size of the item.

avg     = mean(obj.Size, dim);
maxSize = max(obj.Size, dim);
end