function y = mod(x,n) % FUNCTION: MOD Part of DPWT Toolbox % % SYNOPSIS: Y = MOD(X,N) % % DESCRIPTION: MOD gives the remainder on division % of X by N. The result always has the same % sign as N. % % AUTHOR: Neil Getz % DATE: 10-17-92 y = x - n*floor(x/n);