Problem 2154. Distances in a circle
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
Problem Comments
-
5 Comments
Show
2 older comments
J.R.! Menzinger
on 6 Feb 2014
I'm agree.
Anette
on 6 Feb 2014
You are right.
Anette
on 6 Feb 2014
I just changed the testcase, sorry!
Solution Comments
Show commentsProblem Recent Solvers70
Suggested Problems
-
"Low : High - Low : High - Turn around " -- Create a subindices vector
549 Solvers
-
625 Solvers
-
Area of an equilateral triangle
6407 Solvers
-
Matlab Basics - Absolute Value
633 Solvers
-
Test Problem; Create a 5x5 array containing all ones
389 Solvers
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!