roundd.m
Version 1.0.0.0 (1.32 KB) by
Carlos Adrian Vargas Aguilera
Rounds an array up to N digits from the left.
Rounds an array up to N digits from the left, taking the element with more digits to the left ['max(abs(x(:)))'] as the reference. So, it is different from ROUNDN (mappinf toolbox) because this latter takes the dot as reference.
roundd(0.012345,3) = 0.012300
roundd(0.012345,4) = 0.012350, etc
Note: inside there is a function that check where an array has integer (natural numbers) elements: ISNATURAL
Check the screenshot for an example.
Cite As
Carlos Adrian Vargas Aguilera (2026). roundd.m (https://nl.mathworks.com/matlabcentral/fileexchange/12992-roundd-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R14SP3
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Numbers and Precision in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | BSD License |
