What is an alternative for round(A, N) in version R2014a.
7 次查看(过去 30 天)
显示 更早的评论
I am using a function round(A, N) in my code in version R2015b. But sometimes I need to use the same code in version R2014a for some reasons. But this lower version does not accept this function and I can not find any alternative. Is there any alternative in the version R2014a?
1 个评论
Jan
2016-11-10
@Ondrej: If you take the time to search for "round" in this forum, you will find the posted solution fast. This is more efficient than asking again.
采纳的回答
Star Strider
2016-11-9
I created this one for that purpose:
roundn = @(x,n) round(x .* 10.^n)./10.^n; % Round ‘x’ To ‘n’ Digits, Emulates Latest ‘round’ Function
It works the same way, and gives the same results as the built-in function.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!