Distances in a circle - MATLAB Cody - MATLAB Central

Problem 2154. Distances in a circle

Difficulty:Rate

A circle (360°) is given and a row of 6 monotonic increasing numbers with the which difference from last to first value is less than 360. Find the 6 distances between the numbers including the distance from last to first number.

Example1:

  • Input: [30 90 120 150 210 270]
  • Result: [60 30 30 60 60 120]

Example2:

  • Input: [140 220 260 320 380 440]
  • Result: [80 40 60 60 60 60]

Solution Stats

69.23% Correct | 30.77% Incorrect
Last Solution submitted on Nov 25, 2024

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
3
5
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers70

Suggested Problems

More from this Author1

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