ceil at specified decima

3 Ansichten (letzte 30 Tage)
Yu Li
Yu Li am 18 Nov. 2022
Beantwortet: dpb am 18 Nov. 2022
Hi:
Matlab "round" function can specify which decima to "round at", but there is no similar feature to "ceil" function.
for example, integer 1234,
round(1234,-1) get a result 1230, but is there any quick way to get number 1240?
Thanks!

Antworten (1)

dpb
dpb am 18 Nov. 2022
>> ceil(x/10)*10
ans =
1240.00
>>

Kategorien

Mehr zu Elementary Math finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by