distance between any two points

3 次查看(过去 30 天)

采纳的回答

Image Analyst
Image Analyst 2020-11-21
Use input() or ginput() to ask the user for the two points.
[x, y] = ginput(2);
Instead of the square root symbol, use sqrt():
d = sqrt((x1-x2)^2 + (y1-y2)^2)
extract x1 and x2 from x or else use x(1) and x(2).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Formatting and Annotation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by