필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
cfjunior
cfjunior 2013년 7월 23일
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!

채택된 답변

kjetil87
kjetil87 2013년 7월 23일
x=730-rem(730,7)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by