File Exchange

image thumbnail


version (1.68 KB) by Tony Reina
Calculates the minimal Euclidean distance between two bounding boxes.

1 Download

Updated 02 May 2016

View License

This function takes as inputs two bounding boxes and calculates the norm between the two closest points in each box. If the boxes overlap, then the distance is defined as 0.

Cite As

Tony Reina (2021). bbDist (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Carl Witthoft

Your documentation says
% Bounding boxes in MATLAB are stored as
% bb = [x y width height]

However, the help page in MATLAB says, "[start,finish] = H5S.get_select_bounds(space_id) returns the coordinates of the bounding box containing the current selection. start contains the starting coordinates of the bounding box and finish contains the coordinates of the diagonally opposite corner."

Can you comment on the discrepancy?

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!