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

3 visualizaciones (últimos 30 días)
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!

Respuesta aceptada

kjetil87
kjetil87 el 23 de Jul. de 2013
x=730-rem(730,7)

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by