A rounding problem that falls under ceil and round
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
SETH GERSBACH
le 20 Mar 2022
Commenté : SETH GERSBACH
le 20 Mar 2022
I would like to round a number up to the nearest 100 place
i.e
x = 20
y = round(x)
y = 100
I'm doing this to record the maximun possible value, I know ceil will always round up but I can't set it to a set value
here is the current code
distance = 50; % Distance the package will travel (Km)
distnace_check = round(distance,-2);
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Switches and Breakers dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!