フィルターのクリア

How to round number up to a specific number of decimal places?

18 ビュー (過去 30 日間)
Paulo Silva
Paulo Silva 2020 年 8 月 3 日
回答済み: Alan Stevens 2020 年 8 月 3 日
Suppose I have a variable x=0.34; is there a function (or how would one look like) to round this number up to, say 0.4 (next highest number with one decimal place)?
Just like ceil, but with decimals?

採用された回答

Alan Stevens
Alan Stevens 2020 年 8 月 3 日
ceil(10*x)/10

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by