Write header comments providing user documentation.
Priority
Recommended
Severity level
7
Description
Write 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.
Rationale
This increases readability, and makes the code more likely to be found and less likely to be reinvented.
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