image thumbnail

Round Up to n Digits (ceiln)

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

22 Downloads

Updated 02 Sep 2021

From GitHub

View license on GitHub

ceiln View Round Up to n Digits (ceiln) on File Exchange

Round up (toward positive infinity) to n digits.

Syntax

y = ceiln(x,n)

Description

y = ceiln(x,n) rounds x up to n digits (i.e. rounds x up 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 up to n digits to right of decimal point
  • n = 0: round up to nearest integer
  • n < 0: round up 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 Up to n Digits (ceiln) (https://github.com/tamaskis/ceiln-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.