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


Problem Group

Solution Statistics

119 correct solutions 78 incorrect solutions
Last solution submitted on Oct 12, 2015