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

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.

Example:

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

Outputs

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

Tags

Problem Group

Solution Statistics

52 correct solutions 20 incorrect solutions
Last solution submitted on Jul 22, 2014