Last active
August 29, 2015 14:20
-
-
Save revenkroz/a8ce62f7bc5b28587740 to your computer and use it in GitHub Desktop.
Функция, с выбором количества десятичных знаков, до которых нужно округлить
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function value = myround(x, n) | |
if(n > 0) n = -n; end | |
value = round(x/(10^n))*(10^n); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment