Selecting one side of xy data points
5 次查看(过去 30 天)
显示 更早的评论
Hi all,
i have 2 shapes represnted as a series of x,y data points see represntative picture
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1665491/image.jpeg)
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
2024-4-11
Do you already have the list of coordinates of the lower edge of the blue object and the upper edge of the red object?
回答(1 个)
Chunru
2024-4-12
You can use inpolygon to test if the dot is in red shape or blue shape:
doc inpolygon
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!