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 895. Generate N equally spaced intervals between -L and L

Created by @bmtran

Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments.

For example, if L = 3 and N = 2

    y = [ -3 0 3 ]

Tags

Problem Group

Solution Statistics

95 correct solutions 58 incorrect solutions
Last solution submitted on Jul 18, 2014