Is there any function in MATLAB, which would round the values to nearest big integers?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
raghavendra kandukuri
le 5 Déc 2018
Commenté : madhan ravi
le 5 Déc 2018
I am looking for a function or proceudre, which would convert the given value to nearest big value, for example:
Input: Expected OUTPUT:
2598 2600
2499 2500
2399 2400
2299 2300
2199 2200
2099 2100
1999 2000
1898 2000
1797 1800
0 commentaires
Réponse acceptée
madhan ravi
le 5 Déc 2018
Modifié(e) : madhan ravi
le 5 Déc 2018
Yes use round()
inputs=[2598
2499
2399
2299
2199
2099
1999
1898
1797]
round(inputs./100)*100
command window:
inputs =
2598
2499
2399
2299
2199
2099
1999
1898
1797
ans =
2600
2500
2400
2300
2200
2100
2000
1900
1800
>>
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical 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!