Distance of the centroids of the balls - MATLAB Cody - MATLAB Central

Problem 2317. Distance of the centroids of the balls

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

60.55% Correct | 39.45% Incorrect
Last Solution submitted on Feb 25, 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
4

Group

Physics Image
Physics
  • 18 Problems
  • 13 Finishers

Problem Recent Solvers58

Community Treasure Hunt

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

Start Hunting!
Go to top of page