How to round UP to 1 decimal value?

12 views (last 30 days)
Suppose I have a value x = 6.543. I want to round it up to 6.6.
I tried
x = 6.543;
x_round = round(x,1);
But it always returns x_round=6.5
Thanks in advance!

Accepted Answer

Alan Stevens
Alan Stevens on 23 Oct 2020
Edited: Alan Stevens on 23 Oct 2020
ceil(x*10)/10

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!