Discover MakerZone

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

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!

Problem 1066. Multiples of a Number in a Given Range

Created by @bmtran

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 ];


Problem Group

Solution Statistics

68 correct solutions 28 incorrect solutions
Last solution submitted on Nov 23, 2015