File Exchange

image thumbnail

roundd.m

Rounds an array up to N digits from the left.

0 Downloads

Updated 04 May 2016

View License

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.

Comments and Ratings (1)

Tanya Chen

Good. I some times need to clean my data and this has been useful. Thanks

Updates

1.0.0.0

BSD License

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux