%% Remainder After Division for Floating-Point Values
% Find the remainder after division for several angles using a modulus of 2*pi. Note that mod attempts to compensate for floating-point round-off effects to produce exact integer results when possible.

theta = [0.0 3.5 5.9 6.2 9.0 4*pi];
m = 2*pi;
b = mod(theta,m)

% Copyright 2012 The MathWorks, Inc.