Minimum Distance loop between 'n' number of points
No License
Function to find the minimum distance loop from given set of points.
This function uses the distance formula to genrate a minimum distance loop.
function mindist = minimumdistance(X,Y,x,y)
X = X coordinate vector
Y = Y coordinate vector
(x,y) point where the loop is to be started
This point is labeled as 1 and then the rest in (X,Y) starting from 2 onwards
mindist = final value of the minimum distance from point (x,y) to (x,y)
(This function uses the distance formula directly and no algorithms as such. Any suggestions to improve the code are most welcome)
Cite As
Rohit (2024). Minimum Distance loop between 'n' number of points (https://www.mathworks.com/matlabcentral/fileexchange/22039-minimum-distance-loop-between-n-number-of-points), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.