image thumbnail

Round Down to n Digits (floorn)

version 3.0.0 (5.24 KB) by Tamas Kis
Round down (toward negative infinity) to n digits.

25 Downloads

Updated 02 Sep 2021

From GitHub

View license on GitHub

floorn View Round Down to n Digits (floorn) on File Exchange

Round down (toward negative infinity) to n digits.

Syntax

y = floorn(x,n)

Description

y = floorn(x,n) rounds x down to n digits (i.e. rounds x down to nearest multiple of ) and returns the result as y. x can be input as a single number or as an array of any size; if input as an array, then y will be an array of the same size.

  • n > 0: round down to n digits to right of decimal point
  • n = 0: round down to nearest integer
  • n < 0: round down to n digits to left of decimal point

Examples

  • See "EXAMPLES.mlx" or the "Examples" tab on the File Exchange page for examples.

Cite As

Tamas Kis (2021). Round Down to n Digits (floorn) (https://github.com/tamaskis/floorn-MATLAB/releases/tag/v3.0.0), GitHub. Retrieved .

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

Community Treasure Hunt

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

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.