Problem 1066. Multiples of a Number in a Given Range

Given an integer factor f and a range defined by xlow and xhigh inclusive, return a vector of the multiples of f that fall in the specified range.


    f = 10;
    xlow = 35;
    xhigh = 112;
    multiples = bounded_multiples(f, xlow, xhigh);


    multiples = [ 40 50 60 70 80 90 100 110 ];

Solution Stats

63.4% Correct | 36.6% Incorrect
Last solution submitted on Sep 18, 2017

Problem Comments

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!