Effacer les filtres
Effacer les filtres

How do I find the greater minor number that is divisible by 'n'?

2 vues (au cours des 30 derniers jours)
cfjunior
cfjunior le 23 Juil 2013
How do I find the greatest minor number that is divisible by 'n'?
For example, if I have the number 730 and I want to find the greatest number minor than 730 that when divided by 7 gives me an integer.
I need to write that for 3 cases: divisible by 7, 15 and 30...
tks!

Réponse acceptée

kjetil87
kjetil87 le 23 Juil 2013
x=730-rem(730,7)

Plus de réponses (0)

Catégories

En savoir plus sur Numeric Types dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by