⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 roundoff.m

📁 计量工具箱
💻 M
字号:
function y = roundoff(number,decimal_places)% PURPOSE: Rounds a number(vector) to a specified number of decimal places% ----------------------------------------------------% USAGE: y = roundoff(x,dplaces)%        where: x       = a vector (or scalar)%               dplaces = # of decimal places in y% ----------------------------------------------------% RETURNS: y = a vector (or scalar) with the%          specified decimal places% ----------------------------------------------------% I don't know who wrote this one, but it comes% in handy sometimes  decimals = 10.^decimal_places;  y = fix(decimals * number + 0.5)./decimals;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -