Borrar filtros
Borrar filtros

Find coordinates at the midpoint of a line.

33 visualizaciones (últimos 30 días)
Mark
Mark el 27 de Nov. de 2011
Respondida: Ankit el 19 de En. de 2023
I can plot a line between points (so I know the x and y's of the endpoints). I also know this can give the distance between the points. I'm sure there is a oneline command to calculate the midpoint coordinates. Any help would be appreciated. Thankyou.

Respuesta aceptada

Walter Roberson
Walter Roberson el 27 de Nov. de 2011
[(x1+x2)/2, (y1+y2)/2]

Más respuestas (1)

Ankit
Ankit el 19 de En. de 2023
line=[x1 y1;x2 y2]
line=[0 0;10 50];
mid_pt=mean(line)
mid_pt = 1×2
5 25

Categorías

Más información sobre Environment and Clutter en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by