Generate N equally spaced intervals between -L and L - MATLAB Cody - MATLAB Central

Problem 895. Generate N equally spaced intervals between -L and L

Difficulty:Rate
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 ]

Solution Stats

41.99% Correct | 58.01% Incorrect
Last Solution submitted on May 07, 2025

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
3

Group

Indexing I Image
Indexing I
  • 27 Problems
  • 237 Finishers

Problem Recent Solvers892

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page