Create array of all Distances between two Sets of Points : No Neural Network Toolbox - MATLAB Cody - MATLAB Central

Problem 1117. Create array of all Distances between two Sets of Points : No Neural Network Toolbox

Difficulty:Rate

This Challenge is a subsection of Martian Pranks based on Tim's efficient Distance calculation between sets of points for the 99%.

The Neural Network Toolbox function "dist" solves this puzzle instantly if you are in the 1% with this Toolbox. This Challenge is for the 99%.

Given Point Set vectors Start and Final determine the distance between each Start and each Final Point.

Input: Start(m,2), Final(m,2)

Output: Distances (m,m)

Example:

Input: [0 0;0 1], [2 0;3 3]

Output: [2 4.24; 2.24 3.61]

TestSuite will perform rounding

Hint: Tags

Solution Stats

57.78% Correct | 42.22% Incorrect
Last Solution submitted on Jun 01, 2025

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
3
6

Problem Recent Solvers21

Suggested Problems

More from this Author308

Problem Tags

Community Treasure Hunt

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

Start Hunting!