asking matlab operation

1 回表示 (過去 30 日間)
sam arf
sam arf 2012 年 2 月 1 日
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?

採用された回答

the cyclist
the cyclist 2012 年 2 月 1 日
The ceil() function (short for "ceiling") does that. There are also related functions such as floor(), round(), and fix().
  1 件のコメント
sam arf
sam arf 2012 年 2 月 2 日
thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDetection についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by