Skip to content

Instantly share code, notes, and snippets.

@revenkroz
Last active August 29, 2015 14:20
Show Gist options
  • Save revenkroz/a8ce62f7bc5b28587740 to your computer and use it in GitHub Desktop.
Save revenkroz/a8ce62f7bc5b28587740 to your computer and use it in GitHub Desktop.
Функция, с выбором количества десятичных знаков, до которых нужно округлить
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