Round with significant digits

Rounds towards the nearest number with N significant digits.

下载
下载

您现在正在关注此提交

编者注: This file was selected as MATLAB Central Pick of the Week

引用格式

François Beauducel (2026). Round with significant digits (https://ww2.mathworks.cn/matlabcentral/fileexchange/26212-round-with-significant-digits), MATLAB Central File Exchange. 检索时间: .

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.6.0

fix a problem with vectors with negative and positive exponent values (problem since the last update only).

下载
1.5.0

solve the floating point arithmetic problem with roundsd(3.55,2) pointed out by Will and Yuri K.

下载
1.3.0

- adds different methods for rounding;
- corrects a bug for 0 values (now produces 0 instead of NaN), thanks to Daniel Armyr's comment.

下载
1.2.0

works with negative numbers.

下载
1.1.0

works with negative numbers.

下载
1.0.0

下载