function roundedX = roundToMultiple(x, m)
%ROUNDTOMULTIPLE Round number to the nearest multiple of another number.
%   ROUNDEDX = ROUNDTOMULTIPLE(X, M) returns the value X rounded to
%   the nearest multiple of M.

%   Author: Damien Teney

roundedX = round(x ./ m) .* m;
