Selecting one side of xy data points

31 ビュー (過去 30 日間)
tim pearce
tim pearce 2024 年 4 月 10 日 13:19
回答済み: Chunru 2024 年 4 月 12 日 8:50
Hi all,
i have 2 shapes represnted as a series of x,y data points see represntative picture
im trying to measure beteen the upper surface of the red shape and the lower side of the blue defined shape,
the data points are completly random and ive got a lot to compare apporx 2000.
i can create a line of evenly spaced data points around each shape, so the next part im struggling is making sure im only measuring between the top and bottom. i need to measure at several incrumentas but im struggling to think of the correct logic.
any ideas
many thanks tim
  2 件のコメント
Rik
Rik 2024 年 4 月 11 日 4:27
Do you already have the list of coordinates of the lower edge of the blue object and the upper edge of the red object?
tim pearce
tim pearce 2024 年 4 月 12 日 8:32
Hi sorry yes the 2 shapes are stored in separate matrix’s I can share the actual shape but I’ll put together a representative example

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

回答 (1 件)

Chunru
Chunru 2024 年 4 月 12 日 8:50
You can use inpolygon to test if the dot is in red shape or blue shape:
doc inpolygon

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by