フィルターのクリア

How to find length of a line

4 ビュー (過去 30 日間)
Elie
Elie 2014 年 2 月 11 日
コメント済み: Elie 2014 年 2 月 11 日
how i can find the length of this line in the x direction and in y direction
line(newBoxPolygon(:, 1), newBoxPolygon(:, 2), 'Color', 'R');
This piece of code draws a rectangular polygon , can anyone tell me how to calculate the width and the height generated by this line. Thank you

採用された回答

Walter Roberson
Walter Roberson 2014 年 2 月 11 日
Let X = newBoxPolygon(:, 1) and Y = newBoxPolygon(:, 2), then
width = max(X) - min(X)
height = max(Y) - min(Y)
  1 件のコメント
Elie
Elie 2014 年 2 月 11 日
Thank you very much.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Polygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by