Columns with implicit meaning

IDFCNS-15
TitleAvoid the use of matrices in which rows or columns have implicit meaning.
PriorityRecommended
Severity level5
DescriptionAvoid the use of matrices in which rows or columns have implicit meaning. Use individual vectors instead.
RationaleUsing matrices with implicit row or column meanings reduces the readability and robustness of the code.

Avoid:

distance = sqrt(coordinates(:, 1) .^ 2 + coordinates(:, 2) .^ 2);

Instead use:

distance = sqrt(x .^ 2 + y .^ 2);