Given n balls of radius r and the vector p (nx3) with all position (x,y,z) of the balls, return the symmetric matrix A (nxn) containing all distance between the centroid of all balls (diagonal terms should be all 0).
Two or more balls can overlap.

Solution Stats

136 Solutions

70 Solvers

Last Solution submitted on May 22, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers70

Suggested Problems

More from this Author11

Community Treasure Hunt

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

Start Hunting!