round off to nearest 5 instead of 10
69 次查看(过去 30 天)
显示 更早的评论
is that any way to round off to nearest 5 instead of 10? for example, round off 346 to 345; 293 to 295; 296 to 295;
thx for help :p
3 个评论
John D'Errico
2020-10-4
@Aiman Waheed:
Use round. READ THE HELP FOR ROUND. Unless you have an old release of MATLAB, round has allowed you to round to any number of digits for some years now.
Note that you cannot round to an EXACT decimal, since MATLAB does not store numbers in a decimal form.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!