distmod(x,n)

Version 1.0.0.0 (497 Bytes) by Ted
Calculate the "distance" (absolute difference) between x and the nearest multiple of the modulus n.
50 Downloads
Updated 25 Aug 2015

View License

Distmod finds the "distance" (absolute difference) between x and the nearest multiple of the modulus n. This function is useful when answering the question: "Is x a multiple of n, plus or minus some tolerance?"

Cite As

Ted (2024). distmod(x,n) (https://www.mathworks.com/matlabcentral/fileexchange/52664-distmod-x-n), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Coordinate Transformations in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0