フィルターのクリア

Find coordinates at the midpoint of a line.

33 ビュー (過去 30 日間)
Mark
Mark 2011 年 11 月 27 日
回答済み: Ankit 2023 年 1 月 19 日
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.

採用された回答

Walter Roberson
Walter Roberson 2011 年 11 月 27 日
[(x1+x2)/2, (y1+y2)/2]
  1 件のコメント
Mark
Mark 2011 年 11 月 27 日
Thank you very much.

サインインしてコメントする。

その他の回答 (1 件)

Ankit
Ankit 2023 年 1 月 19 日
line=[x1 y1;x2 y2]
line=[0 0;10 50];
mid_pt=mean(line)
mid_pt = 1×2
5 25

カテゴリ

Help Center および File ExchangeEnvironment and Clutter についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by