from
RF Design and Analysis
by Jackson Harvey A collection of functions, scripts, & Simulink models useful for designing and analyzing RF systems
roundto (X, Resolution)
% ROUNDTO Round the input to a specified resolution
%
% [Y] = ROUNDTO (X, Resolution) rounds X to Resolution.
function [Y] = roundto (X, Resolution)
Y = round (X / Resolution) * Resolution;