ROUND2DP

版本 1.0.0.0 (1.1 KB) 作者: Andrew
Round a number to a given number of decimal places
1.2K 次下载
更新时间 2009/5/20

查看许可证

This expands on the operation of the built-in ROUND function to provide functionality to round to a given number of decimal places. For example,

>> round(pi)
ans =
3

>> round2dp(pi,3)
ans =
3.142

引用格式

Andrew (2024). ROUND2DP (https://www.mathworks.com/matlabcentral/fileexchange/24213-round2dp), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2008a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Arithmetic Operations 的更多信息
致谢

参考作品: round2

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0