function [q] = quantize(val, quantum)
% quantize(VALUE,QUANTUM) returns the elements of VALUE rounded to the
% nearest multiples of QUANTUM.

q = quantum .* round(val./quantum);
