help find two closet node with their index ..distance = sqrt((xd-x(I))^2 + (yd-y(I))^2)

2 views (last 30 days)
help find two closet node with their index ..distance = sqrt((xd-x(I))^2 + (yd-y(I))^2)

Answers (1)

Jan
Jan on 29 Jan 2015
[value, index] = min(sqrt((xd-x(I))^2 + (yd-y(I))^2))

Categories

Find more on Instrument Control Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!