asking matlab operation
2 次查看(过去 30 天)
显示 更早的评论
hi, I got some problem about math operation
it's like this: 2/2=1 3/2=1.5 rounded up to 2 (so 3/2 = 2) 5/2=2.5 rounded up to 3 ( 5/2 = 3)
so, it's answer is rounded up, in C++ we use operation "!" (3!2=2) if I'm not wrong, so how about in matlab?
0 个评论
采纳的回答
the cyclist
2012-2-1
The ceil() function (short for "ceiling") does that. There are also related functions such as floor(), round(), and fix().
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Detection 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!