Filter löschen
Filter löschen

distance between any two points

3 Ansichten (letzte 30 Tage)
matlab coder
matlab coder am 21 Nov. 2020
Beantwortet: Image Analyst am 21 Nov. 2020

Akzeptierte Antwort

Image Analyst
Image Analyst am 21 Nov. 2020
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).

Weitere Antworten (0)

Kategorien

Mehr zu Formatting and Annotation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by